|
From: philip M. <ph...@co...> - 2003-05-16 10:15:48
|
Hello Zodiaq, You could have funX pass a code to smallFun which indicates what function called it (eg fun11 would pass 11 to FunQ), and when smallFun throws an exception it can include this code in the exception object, so that when FunQ catches it it knows which function called smallFun. -------------------------------------------------------------------------- Philip Mortimer www: http://mysite.freeserve.com/coniferway/index.html. Available for short and long term contracts --------------------------------------------------------------------------- ----- Original Message ----- From: "Zodiaq" <zo...@ac...> To: <Dev...@li...> Sent: Friday, May 16, 2003 12:03 AM Subject: [Dev-C++] about exceptions > Hello all Dev-cpp-users, > > I have one important question - this small example will show what my > mail is all about... let's say I have one major function (FunQ) which > calls many smaller functions(fun1 - fun20), and all of these functions > uses the same small function (smallFun) which conditionaly may throw > exceptions... only FunQ catches these exceptions... is there some a > way to know which way this exception came apart from rethrowing it > from funX (where X is number 1-20)... adding in many points in every > fun1-fun20 try...catch is what I want to avoid... maybe there is > something similar like __LINE__ or __FILE__ but about call stack?? > > -- > regards Zodiaq > > > > ------------------------------------------------------- > Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara > The only event dedicated to issues related to Linux enterprise solutions > www.enterpriselinuxforum.com > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |