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

20 lines
415 B
C++
Raw Normal View History

2024-04-01 00:01:49 -04:00
#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);
}
}