[Xorp-hackers] BGP and exceptions

Adam Greenhalgh a.greenhalgh at cs.ucl.ac.uk
Thu Apr 22 03:17:36 PDT 2010

Its this type of discussion that should probably occur on the
teleconferences after we've got the first one out of the way.


On 22 April 2010 10:23, Bruce Simpson <bms at incunabulum.net> wrote:
> Ben Greear wrote:
> ...
>> Since you don't even get a useful stack-trace out of the exception
>> crashes, and since the attribute decode logic is typically ~20 stack frames
>> deep, it's very difficult to debug the cause of the exceptions and to
>> figure out where to add appropriate catch() logic.
> Perhaps finishing the backtrace() facility would help.
> I have run into this issue myself on some current work, the trouble is
> getting clients to run code out of SVN may still be asking too much--
> although some shops do have enough in-house talent to swing it.
> Our policy of not implementing release branches has worked against us
> here, however, that was not a policy I instituted; there just haven't
> been enough people working full-time on the code to justify it outside
> of the company.
>> Does anyone have any strong attraction to using exceptions, or can
>> we move to returning NULL and/or checking an 'is_valid()' flag
>> on the attributes instead of throwing lots of exceptions?
> It's how we've always done things, as it's a good use of the language
> and helps to cut down on cluttering the code with conditionals.
> +1 for staying with exceptions.
> _______________________________________________
> Xorp-hackers mailing list
> Xorp-hackers at icir.org
> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers

More information about the Xorp-hackers mailing list