diff options
Diffstat (limited to 'indra/mac_crash_logger/mac_crash_logger.cpp')
-rwxr-xr-x | indra/mac_crash_logger/mac_crash_logger.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/indra/mac_crash_logger/mac_crash_logger.cpp b/indra/mac_crash_logger/mac_crash_logger.cpp index 6add74556f..d6b913829e 100755 --- a/indra/mac_crash_logger/mac_crash_logger.cpp +++ b/indra/mac_crash_logger/mac_crash_logger.cpp @@ -27,6 +27,7 @@ #include "linden_common.h" #include "llcrashloggermac.h" #include "indra_constants.h" +#include "llpidlock.h" #include <iostream> @@ -35,21 +36,27 @@ int main(int argc, char **argv) LLCrashLoggerMac app; app.parseCommandOptions(argc, argv); + LLSD options = LLApp::instance()->getOptionData( + LLApp::PRIORITY_COMMAND_LINE); + + if (!(options.has("pid") && options.has("dumpdir"))) + { + llwarns << "Insufficient parameters to crash report." << llendl; + } + if (! app.init()) { - llwarns << "Unable to initialize application." << llendl; + LL_WARNS() << "Unable to initialize application." << LL_ENDL; return 1; } if (app.getCrashBehavior() != CRASH_BEHAVIOR_ALWAYS_SEND) { // return NSApplicationMain(argc, (const char **)argv); } - app.mainLoop(); - app.cleanup(); - llinfos << "Crash reporter finished normally." << llendl; + LL_INFOS() << "Crash reporter finished normally." << LL_ENDL; return 0; } |