v1.4.4
This commit is contained in:
commit
9c94d113d3
10260 changed files with 1237388 additions and 0 deletions
31
attic/old_tests/stacktrace_test.cpp
Normal file
31
attic/old_tests/stacktrace_test.cpp
Normal file
|
@ -0,0 +1,31 @@
|
|||
#include "StarFormat.hpp"
|
||||
|
||||
using namespace Star;
|
||||
|
||||
void throwException() {
|
||||
throw StarException("some exception");
|
||||
}
|
||||
|
||||
void baz() {
|
||||
throwException();
|
||||
}
|
||||
|
||||
void bar() {
|
||||
baz();
|
||||
}
|
||||
|
||||
void foo() {
|
||||
try {
|
||||
bar();
|
||||
} catch(std::exception const& e) {
|
||||
throw StarException("some top-level exception", e);
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
try {
|
||||
foo();
|
||||
} catch(std::exception const& e) {
|
||||
coutf("%s\n", e.what());
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue