Skip to content

Instantly share code, notes, and snippets.

@sangfansh
Created August 10, 2018 19:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sangfansh/e884ede5fd80082eeedc70f22e8f2e4c to your computer and use it in GitHub Desktop.
Save sangfansh/e884ede5fd80082eeedc70f22e8f2e4c to your computer and use it in GitHub Desktop.
#include <iostream>
#include <unistd.h>
#include "LogBase.h"
using namespace util;
#include "MessageHandler.h"
int Main(int argc, char* argv[]) {
LogBase::Inst();
int ret = 0;
MessageHandler msg;
msg.init();
msg.start();
return ret;
}
int main( int argc, char **argv ) {
try {
return Main(argc, argv);
} catch (std::exception& e) {
Log("exception: %s", e.what());
} catch (...) {
Log("unexpected exception") ;
}
return -1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment