Re: Check return codes everywhere

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Markus Elfring [Sun, Jan 04, 2009 at 01:43:41PM +0100]:
> > But yes, in general everything that could result in an error
> > should be caught.
> >   
> 
> How do you think about the reaction "exit(errno)" or "abort()"?

Not sure whether calling any of those directly makes much sense
("why did gpm die?") and whether there's always an errno value.

Maybe adding errno to gpm_report() as an additional argument
and strerror() it, if it's non-zero could do the job.

> Would you like to reduce the efforts for error code checking by an
> exception class hierarchy?
> http://dietmar-kuehl.de/mirror/c++-faq/exceptions.html#faq-17.1
> http://cexcept.sourceforge.net/
> 
> Are there any chances to apply usual advices by tools from the software
> area "aspect-oriented programming"?
> http://research.msrg.utoronto.ca/ACC/Tutorial#A_Reusable_Aspect_for_Memory_All

I must confess that I would like to have gpm cleaned up much more,
before we add more dependencies on other projects.

I personally see no advantage using try{} catch(), the ACC idea looks
somehow nice, maybe something for the future.

Nico

-- 
Think about Free and Open Source Software (FOSS).
http://nico.schottelius.org/documentations/foss/the-term-foss/

PGP: BFE4 C736 ABE5 406F 8F42  F7CF B8BE F92A 9885 188C

Attachment: signature.asc
Description: Digital signature

_______________________________________________
gpm mailing list
gpm@xxxxxxxxxxxxxx
http://lists.linux.it/listinfo/gpm

[Index of Archives]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Gimp]     [Yosemite News]