If I want my program to abend with a certain return code, when a certain exception is raised, can I just use:

catch(blabla)
{
return 99;

}

And the program (actually the main function) abends with this returncode and exits the program...?

Which is the BEST way to handle this kinds of things... my application, yet small will run non stop in a manufacturing environment, and I want it to be as failprofe as possible. I have implemented, try, catch, finally all that is left is the returncodes to the windows app that manages ALL the programs running...

I prefer if you give any answer with ObjectOrientation in mind... classes inheritance etc... cause I am an OO gay :=)


best regards
henrik