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.

29 lines
1.1 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. /*!
  7. * Main entry point of the executable storm.
  8. */
  9. int main(const int argc, const char** argv) {
  10. try {
  11. storm::utility::setUp();
  12. storm::cli::printHeader(argc, argv);
  13. bool optionsCorrect = storm::cli::parseOptions(argc, argv);
  14. if (!optionsCorrect) {
  15. return -1;
  16. }
  17. // From this point on we are ready to carry out the actual computations.
  18. storm::cli::processOptions();
  19. // All operations have now been performed, so we clean up everything and terminate.
  20. storm::utility::cleanUp();
  21. return 0;
  22. } catch (storm::exceptions::BaseException const& exception) {
  23. STORM_LOG_ERROR("An exception caused StoRM to terminate. The message of the exception is: " << exception.what());
  24. } catch (std::exception const& exception) {
  25. STORM_LOG_ERROR("An unexpected exception occurred and caused StoRM to terminate. The message of this exception is: " << exception.what());
  26. }
  27. }