Browse Source

Return -1 on error (needed by package managers).


git-svn-id: https://svn.microneil.com/svn/SNFUtility/trunk@36 aa37657e-1934-4a5f-aa6d-2d8eab27ff7c
master
adeniz 12 years ago
parent
commit
f17399da6e
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      SNFMilterConfig/main.cpp

+ 3
- 0
SNFMilterConfig/main.cpp View File

catch(exception& e) { // Report any normal exceptions. catch(exception& e) { // Report any normal exceptions.
cerr << "\n\nSNFMilterConfig Exception: " << e.what() << endl << endl; cerr << "\n\nSNFMilterConfig Exception: " << e.what() << endl << endl;
RestoreFiles(&SnfMilterConfig); RestoreFiles(&SnfMilterConfig);
return(-1);
} }
catch (snfCFGmgr::LoadFailure) { // Error loading configuration file. catch (snfCFGmgr::LoadFailure) { // Error loading configuration file.
cerr << "\n\nsnfCFGmgr Exception: Unable to load the configuration file " cerr << "\n\nsnfCFGmgr Exception: Unable to load the configuration file "
<< SnfMilterConfig.GetConfigFileName() << endl << endl; << SnfMilterConfig.GetConfigFileName() << endl << endl;
RestoreFiles(&SnfMilterConfig); RestoreFiles(&SnfMilterConfig);
return(-1);
} }
catch(...) { // Report any unexpected exceptions. catch(...) { // Report any unexpected exceptions.
cerr << "\n\nSNFMilterConfig Panic! Unknown Exception!" << endl << endl; cerr << "\n\nSNFMilterConfig Panic! Unknown Exception!" << endl << endl;
RestoreFiles(&SnfMilterConfig); RestoreFiles(&SnfMilterConfig);
return(-1);
} }
return 0; // Normally we return zero. return 0; // Normally we return zero.

Loading…
Cancel
Save