Re: verbose exception



On Fri, 2006-09-22 at 16:01 -0500, Paul Davis wrote:
> I've know of a guy that did something with similar functionality but a
> better implementation.
> 
> http://www.slamb.org/svn/repos/trunk/projects/atoms/atoms/debug.cc
> 
> This is an implementation of a Backtrace class that can be
> conditionally included in throw exceptions ( He has it compile
> conditional )
> 
> It does depend on the compiler and system though.  Specifically, the
> header execinfo.h ( Which I assume to be a standard gcc extension ).
> Although, execinfo might not exist on other platforms or for other
> compilers. I'm very knowledgable as to all the other compilers and the
> backtrace accessibility. 
> 
> And, its not like you get anything more than you'd get from gdb. So,
> unless you've got a huge project with at least hundreds of
> installations and want to implement some sort of automatic backtrace
> report on crash capability, I don't really see the need. 

GNOME's bug-buddy can get this information when an application crashes.
You have to specify something or other in the .desktop file. However, it
does (and probably this idea too) require the debug symbols to be
present, and most distros don't distribute the debug symbols.

> But, I'll have to agree with the other Paul, wrapping code in
> try/catch blocks is not the way to go (And is generally a Bad Idea).
> 
> Hope that helps,

-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




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