bug-myserver
[Top][All Lists]
Advanced

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

Re: [bug-myserver] [PROPOSAL] Exception management scheme


From: Daniele
Subject: Re: [bug-myserver] [PROPOSAL] Exception management scheme
Date: Sun, 28 Mar 2010 00:31:13 +0100

2010/3/28 Lisa Vitolo <address@hidden>
Eventually, we can wrap this entire system in a macro or function CHECK_ERROR that takes the return value of a function and throws the appropriate exception if necessary.

Usage example:
try
{
   CHECK_ERROR(bind(...));
} catch ...

Hmm, I think that this would be unreadable in the long run. Better, IMHO, to write simple functions to accomplish basic tasks, and those will be bearing the responsibility to check for errors and throw related exceptions when necessary. (In other words: we don't check every time the single "bind()" call, but we invoke a wrapper, otherwise it would bring no real advantages.)

The rest seems fine to me.
Good work! :-)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]