Explorar o código

Use EXIT_FAILURE define instead of hard-coded integers for exit code

Jean-Christophe Fillion-Robin %!s(int64=14) %!d(string=hai) anos
pai
achega
1fc0df3b07

+ 2 - 2
Applications/ctkExampleHostedApp/ctkExampleHostedAppMain.cpp

@@ -103,7 +103,7 @@ int main(int argv, char** argc)
   catch (const ctkPluginException& exc)
   {
     qCritical() << "Failed to initialize the plug-in framework:" << exc;
-    exit(2);
+    return EXIT_FAILURE;
   }
 
 #ifdef CMAKE_INTDIR
@@ -155,7 +155,7 @@ int main(int argv, char** argc)
     qCritical() << "Could not find plugin.";
     qCritical() << "  Plugin name: " << pluginName;
     qCritical() << "  Plugin path: " << pluginPath;
-    exit(3);
+    return EXIT_FAILURE;
   }
 
   // start the plugin framework