COSC-4P82-Final-Project/lib/beagle-3.0.3/tests/Exception/TestStackTrace.cpp

20 lines
415 B
C++

#include "beagle/Beagle.hpp"
#include <iostream>
using namespace std;
int main() {
try {
Beagle_StackTraceBeginM();
Beagle_StackTraceBeginM();
throw Beagle_RunTimeExceptionM("This is a test");
Beagle_StackTraceEndM("Inner");
Beagle_StackTraceEndM("Outer");
}
catch (Beagle::Exception& inException) {
cout << "Caught Beagle::Exception:" << endl;
inException.explain(cerr);
}
}