Advertisement
Guest User

Untitled

a guest
Nov 19th, 2013
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
D 0.97 KB | None | 0 0
  1. int main(string[] args)
  2. {
  3.     ZeroMQ test = new ZeroMQ();
  4.     test.initialize();
  5.     test.start();
  6.     version(unittest){
  7.         logInfo("All unit tests were successful.");
  8.         return 0;
  9.     } else {
  10.         try if (!finalizeCommandLineOptions()) return 0;
  11.         catch (Exception e) {
  12.             logDiagnostic("Error processing command line: %s", e.msg);
  13.             return 1;
  14.         }
  15.  
  16.         lowerPrivileges();
  17.  
  18.         logDiagnostic("Running event loop...");
  19.         int status;
  20.         debug {
  21.             status = runEventLoop();
  22.         } else {
  23.             try {
  24.                 status = runEventLoop();
  25.             } catch( Throwable th ){
  26.                 logError("Unhandled exception in event loop: %s", th.msg);
  27.                 logDiagnostic("Full exception: %s", th.toString().sanitize());
  28.                 return 1;
  29.             }
  30.         }
  31.         logDiagnostic("Event loop exited with status %d.", status);
  32.         return status;
  33.     }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement