try {
sentence_1;
sentence_2;
.
.
.
sentence_m; // if this sentence throws a exception ,program will go to catch() location.
.
.
sentence_n;
}
catch()
{
//printf(xxx) ; //1.notify that exception happens.
// return err; //2. or return an error to caller.
}
It seems very simple. but some codes just catch excpetions and changes the route of program runing. It jump to catch ().so the exceptions is covered by the catch (){} sentence. I recommend 2 methods to prevent some strange phenomenon.