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