ImageMagick: MagickCore, C API for ImageMagick: Dealing with Exceptions
Author: ImageMagick Studio LLC
Description: ImageMagick (TM) is a free software suite to create, edit and compose bitmap images. It can read, convert and write images in a large variety of formats. Images can be cropped, colors can be changed, various effects can be applied, images can be rotated and combined, and text, lines, polygons, ellipses and Bézier curves can be added to images and stretched and rotated. ImageMagick is free software: it is delivered with full source code and can be freely used, copied, modified and distributed. Its license is compatible with the GPL. It runs on all major operating systems. Most of the functionality of ImageMagick can be used interactively from the command line; more often, however, the features are used from programs written in the programming languages Perl, C, C++, Python, PHP, Ruby or Java, for which ready-made ImageMagick interfaces (PerlMagick, Magick++, PythonMagick, MagickWand for PHP, RubyMagick, and JMagick) are available. This makes it possible to modify or create images automa [cell cut: 1159 characters, first 1000 kept]
Keywords: magickcore, c, api, for, imagemagick:, dealing, with, exceptions, ImageMagick, PerlMagick, Magick++, Image, Magick

## CatchException CatchException() returns if no exceptions is found otherwise it reports the exception as a warning, error, or fatal depending on the severity. The format of the CatchException method is:
      CatchException(ExceptionInfo *exception)
A description of each parameter follows: #### exception The exception info. ## DestroyExceptionInfo DestroyExceptionInfo() deallocates memory associated with an exception. The format of the DestroyExceptionInfo method is:
      void DestroyExceptionInfo(ExceptionInfo *exception)
A description of each parameter follows: #### exception The exception info. ## GetExceptionInfo GetExceptionInfo() initializes an exception to default values. The format of the GetExceptionInfo method is:
      GetExceptionInfo(ExceptionInfo *exception)
A description of each parameter follows: #### exception The exception info. ## GetLocaleExceptionMessage GetLocaleExceptionMessage() converts a enumerated exception severity and tag to a message in the current locale. The format of the GetLocaleExceptionMessage method is:
      const char *GetLocaleExceptionMessage(const ExceptionType severity,
        const char *tag)
A description of each parameter follows: #### severity the severity of the exception. #### tag the message tag. ## InheritException InheritException() inherits an exception from a related exception. The format of the InheritException method is:
      InheritException(ExceptionInfo *exception,const ExceptionInfo *relative)
A description of each parameter follows: #### exception The exception info. #### relative The related exception info. ## MagickError MagickError() calls the exception handler methods with an error reason. The format of the MagickError method is:
      void MagickError(const ExceptionType error,const char *reason,
        const char *description)
A description of each parameter follows: #### exception Specifies the numeric error category. #### reason Specifies the reason to display before terminating the program. #### description Specifies any description to the reason. ## MagickFatalError MagickFatalError() calls the fatal exception handler methods with an error reason. The format of the MagickError method is:
      void MagickFatalError(const ExceptionType error,const char *reason,
        const char *description)
A description of each parameter follows: #### exception Specifies the numeric error category. #### reason Specifies the reason to display before terminating the program. #### description Specifies any description to the reason. ## MagickWarning MagickWarning() calls the warning handler methods with a warning reason. The format of the MagickWarning method is:
      void MagickWarning(const ExceptionType warning,const char *reason,
        const char *description)
A description of each parameter follows: #### warning The warning severity. #### reason Define the reason for the warning. #### description Describe the warning. ## SetErrorHandler SetErrorHandler() sets the exception handler to the specified method and returns the previous exception handler. The format of the SetErrorHandler method is:
      ErrorHandler SetErrorHandler(ErrorHandler handler)
A description of each parameter follows: #### handler The method to handle errors. ## SetExceptionInfo SetExceptionInfo() set the exception severity. The format of the SetExceptionInfo method is:
      MagickBooleanType SetExceptionInfo(ExceptionInfo *exception,
        ExceptionType severity)
A description of each parameter follows: #### exception The exception info. #### severity The exception severity. ## SetFatalErrorHandler SetFatalErrorHandler() sets the fatal exception handler to the specified method and returns the previous fatal exception handler. The format of the SetErrorHandler method is:
      ErrorHandler SetErrorHandler(ErrorHandler handler)
A description of each parameter follows: #### handler The method to handle errors. ## SetWarningHandler SetWarningHandler() sets the warning handler to the specified method and returns the previous warning handler. The format of the SetWarningHandler method is:
      ErrorHandler SetWarningHandler(ErrorHandler handler)
A description of each parameter follows: #### handler The method to handle warnings. ## ThrowException ThrowException() throws an exception with the specified severity code, reason, and optional description. The format of the ThrowException method is:
      MagickBooleanType ThrowException(ExceptionInfo *exception_info,
        const ExceptionType severity,const char *reason,
        const char *description)
A description of each parameter follows: #### exception_info The exception info. #### severity The severity of the exception. #### tag The message tag. #### description The exception description. |

Discourse Server | Mailing Lists | Image Gallery | ImageMagick Studio
© 1999-2005 ImageMagick Studio LLC