New feature - logging exceptions

Bob Friesenhahn <[email protected]>
Newsgroups gmane.comp.video.graphicsmagick.apis,gmane.comp.video.graphicsmagick.core
Message-ID <[email protected]>
Today I added support for logging thrown exceptions (internal error
reports) to development GraphicsMagick 1.1.  Displaying these
exceptions is enabled similar to 'gm convert -debug exception ...'. I
believe that ImageMagick added a similar feature yesterday.

In addition to being able to log exceptions, I have added additional
members to the ExceptionInfo structure in order to record the source
module, source line, and function name where the exception originated.
Magick++ has been extended to provide this information via the
exception what() method.  A CopyException function has been added to
support copying from one ExceptionInfo structure to another since it
is now impossible to copy the entire structure using ThrowException
parameters.

A number of additional exception classes have been added to Magick++
so that there is now an exception class corresponding to each
GraphicsMagick exception.  This was always intended to be the case,
but the list of exception types silently grew, and Magick++ fell
behind.

The existing C functions for dispatching exceptions were designed in a
way that makes them impossible to extend.  I am not sure what the best
approach is to deal with adding more information to exceptions.  We
could add a new extended set of APIs in parallel to the existing ones,
simply ignore the fact that the exceptions carry more data now, or add
something specific for the purposes of the gm utility.

Bob
======================================
Bob Friesenhahn
[email protected]
http://www.simplesystems.org/users/bfriesen



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.