Handle the default interpreter's runtime exception.

This commit is contained in:
Vassil Vassilev 2013-09-06 23:37:21 +02:00 committed by sftnight
parent 7c6324d79b
commit 34d2c33c18
2 changed files with 5 additions and 0 deletions

View File

@ -16,6 +16,7 @@ namespace cling {
///\brief Base class for all interpreter exceptions. ///\brief Base class for all interpreter exceptions.
/// ///
class InterpreterException { class InterpreterException {
public:
virtual void what() throw(); virtual void what() throw();
}; };

View File

@ -91,6 +91,10 @@ namespace cling {
} }
catch(runtime::NullDerefException& e) { catch(runtime::NullDerefException& e) {
llvm::errs() << "Exception was thrown at runtime. Recovering...\n";
e.what();
}
catch(runtime::InterpreterException& e) {
// The diagnostic goes here: // The diagnostic goes here:
e.what(); e.what();
} }