COSC_4P82_Assignment_1/lib/beagle-3.0.3/tests/Exception/TestStackTrace.cpp

20 lines
415 B
C++
Raw Normal View History

2024-02-13 21:21:51 -05: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);
}
}