
22 Jun
2006
22 Jun
'06
5:07 p.m.
On 6/20/06, Emil Dotchevski <emildotchevski@hotmail.com> wrote:
Hello,
Hi Emil, [snipped] I liked very much your idea, but something bothers me.
catch( read_error & x ) { if( info * xi = dynamic_cast<info *>(&x) ) if( file_name * fn = xi->get<file_name>() ) ...... }
IMO, this dynamic_cast should be hided by the library. How about: catch(read_error& x) { if(info i = try_get_info(x)) { // ... do something. } } There should be a way to inspect what there's in the info object too, IMHO. I liked the << operator too for the throw statement. [snipped]
--Emil
-- Felipe Magno de Almeida