You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.2 KiB

  1. // Include other headers.
  2. #include "src/exceptions/BaseException.h"
  3. #include "src/utility/macros.h"
  4. #include "src/cli/cli.h"
  5. #include "src/utility/initialize.h"
  6. #include "src/settings/SettingsManager.h"
  7. /*!
  8. * Main entry point of the executable storm.
  9. */
  10. int main(const int argc, const char** argv) {
  11. try {
  12. storm::utility::setUp();
  13. storm::cli::printHeader("SToRM", argc, argv);
  14. storm::settings::initializeAll("SToRM", "storm");
  15. bool optionsCorrect = storm::cli::parseOptions(argc, argv);
  16. if (!optionsCorrect) {
  17. return -1;
  18. }
  19. // From this point on we are ready to carry out the actual computations.
  20. storm::cli::processOptions();
  21. // All operations have now been performed, so we clean up everything and terminate.
  22. storm::utility::cleanUp();
  23. return 0;
  24. } catch (storm::exceptions::BaseException const& exception) {
  25. STORM_LOG_ERROR("An exception caused StoRM to terminate. The message of the exception is: " << exception.what());
  26. } catch (std::exception const& exception) {
  27. STORM_LOG_ERROR("An unexpected exception occurred and caused StoRM to terminate. The message of this exception is: " << exception.what());
  28. }
  29. }