What happens when I throw an exception?
Posted
by helloWorld
on Stack Overflow
See other posts from Stack Overflow
or by helloWorld
Published on 2010-06-17T20:14:08Z
Indexed on
2010/06/17
21:23 UTC
Read the original article
Hit count: 164
I have some technical questions. In this function:
string report() const {
if(list.begin() == list.end()){
throw "not good";
}
//do something
}
If I throw the exception what is going on with the program? Will my function terminate or will it run further? If it terminates, what value will it return?
© Stack Overflow or respective owner