diff --git a/src/catch_it.i b/src/catch_it.i index 70bb1e54c..73707c511 100644 --- a/src/catch_it.i +++ b/src/catch_it.i @@ -29,6 +29,7 @@ createTrajectory; std::logic_error)\ selectAtoms; +%catches(loos::ParseError) parseRangeList; // amber %catches(loos::FileOpenError, loos::FileReadErrorWithLine, loos::LOOSError) Amber::Amber; diff --git a/src/exceptions.i b/src/exceptions.i index 27f92fa69..3b4d20e0e 100644 --- a/src/exceptions.i +++ b/src/exceptions.i @@ -1,5 +1,5 @@ %{ - + #include #include @@ -39,7 +39,11 @@ const char* __str__() { std::string s = self->what(); return(s.c_str()); } } + %extend loos::FileWriteError { const char* __str__() { std::string s = self->what(); return(s.c_str()); } } +%extend loos::ParseError { + const char* __str__() { std::string s = self->what(); return(s.c_str()); } +}