Skip to content

Commit

Permalink
don't throw something that is not an exception
Browse files Browse the repository at this point in the history
  • Loading branch information
adrpo committed Jun 14, 2020
1 parent fa359b7 commit 8630a30
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion OMParser/.gitignore
Expand Up @@ -19,4 +19,4 @@ modelicaVisitor.cpp
modelicaVisitor.h
*.o
*.a
test/
test/
Expand Up @@ -109,7 +109,7 @@ ParseTreePattern ParseTreePatternMatcher::compile(const std::string &pattern, in
throw e;
#else
} catch (std::exception & /*e*/) {
std::throw_with_nested((const char*)"Cannot invoke start rule"); // Wrap any other exception. We should however probably use one of the ANTLR exceptions here.
std::throw_with_nested( std::runtime_error((const char*)"Cannot invoke start rule") ); // Wrap any other exception. We should however probably use one of the ANTLR exceptions here.
#endif
}

Expand Down
2 changes: 1 addition & 1 deletion OMParser/Makefile
@@ -1,6 +1,6 @@

ifeq ($(OMBUILDDIR),)
OMBUILDDIR=$(CURDIR)/build
OMBUILDDIR=$(CURDIR)/../build
endif

CMAKE=cmake
Expand Down

0 comments on commit 8630a30

Please sign in to comment.