[gpm] Check return codes everywhere

Nico Schottelius nico-gpm@schottelius.org
Mon Jan 5 13:20:50 CET 2009


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.linux.it/pipermail/gpm/attachments/20090105/ad40663b/attachment.pgp>


More information about the gpm mailing list