All Questions
Tagged with stack-unwinding try-catch
4 questions
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(){
...
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<...
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 ...
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 ...