Error handling



We have to do something about them .. errors.

I mostly simply ignore them (because my opinion is that too many people
develop with ONLY errors in mind, whereas errors should be handled in
the highest possible layer -- by displaying an error message -- in case
the code can't recover from an error by doing what is expected).

For making it more simple for myself (prioritising things) I simply
printed some warnings whenever an error happens.

I know right error handling requires adding a GError** parameter to
quite a lot methods. I'm not afraid if such an API change at this
moment.

I just needs hands to help me do it. Other error handling schemes and
proposals are discussable. For example an errno style error handling
(with a per-thread errno global variable) or an error singleton or
whatever ... it's all discussable at this moment.

But once decided, there's no way back (the API will be in stone, and I
wouldn't like having to change error handling over and over again).




-- 
Philip Van Hoof, software developer
home: me at pvanhoof dot be
gnome: pvanhoof at gnome dot org
work: vanhoof at x-tend dot be
blog: http://pvanhoof.be/blog




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