Skip to main content

All Questions

Filter by
Sorted by
Tagged with
2 votes
0 answers
495 views

How can linking a static library break C++ exception handling?

I had a recent problem where a thrown C++ exception was not caught and instead leads to program termination. My current MWE is: #include <stdexcept> #include <cupti.h> void foo(){ ...
Flamefire's user avatar
  • 5,777
1 vote
0 answers
179 views

Why does the program terminates abruptly? [duplicate]

#include <iostream> using namespace std; class B { public: ~B() { throw 42; } }; int main() { try { B obj; throw 32; } catch( int i ) { cout<<i<...
Dinesh Gowda's user avatar
  • 1,144
0 votes
0 answers
63 views

Reference Arguments on Exception Stack Unwinding

At a point in my code, I pass a *this to a method foo(const MyClass& arg). An exception is thrown deep inside this foo, but although a syntactically correct try-catch block exists up the stack, it ...
corsel's user avatar
  • 325
1 vote
1 answer
1k views

stack unwinding in exception c++

I started to learn the subject of exceptions in C++. I encountered the term "stack unwinding" which means, to my understanding, that whenever exception is thrown, and there is no catch block inside ...
Day_Dreamer's user avatar
  • 3,373