|
From: Baptiste L. <gai...@fr...> - 2002-12-22 12:55:07
|
----- Original Message ----- From: "Andre Baresel" <and...@gm...> To: "Baptiste Lepilleur" <gai...@fr...> Sent: Sunday, December 22, 2002 1:30 PM Subject: Re: [Cpptool-develop] New Methodlevel Refacturing Features ?? > Baptiste Lepilleur wrote: > >>- add a try-catch-block arround a function call (or any other > >>statement). For the first we could ask the > >>user for the exception type that will be catched and later we could > >>analyse the statement and give the user > >>a list of exceptions that maybe have to be handled because of "throws" > >>in function declarations of calls. > >> > >> > > > >Adding a try/catch is doable. Guessing the exception type is nearly > >impossible. Even C++ compiler can't do that (because of virtual call among > >other things). Even a basic analysis requires very advanced expression > >analysis. > > > Well, ment not a guessing by parsing the called function bodies, but > searching the function header for > a "throws" element. It is usually ill advised to use exception specification, so this would not help. See boost rationale: http://boost.org/more/lib_guide.htm#Exception-specification Baptiste. > > -- Andre |