 
      Reference
Instances of CImgException are thrown when errors are encountered in a CImg function call.  
 More...
Inherits exception.
Inherited by CImgArgumentException, CImgDisplayException, CImgIOException, CImgInstanceException, and CImgWarningException.
| Public Member Functions | |
| const char * | what () const throw () | 
| Return a C-string containing the error message associated to the thrown exception. | |
Instances of CImgException are thrown when errors are encountered in a CImg function call. 
CImgException is the base class of all exceptions thrown by CImg (except CImgAbortException). CImgException is never thrown itself. Derived classes that specify the type of errord are thrown instead. These classes can be:
non-derived exception class.CImg function is invalid. This is probably one of the most thrown exception by CImg. For instance, the following example throws a CImgArgumentException: CImg method does not fit the function requirements. For instance, the following example throws a CImgInstanceException: CImgIOException: cimg_strict_warnings is set, and when a CImg function has to display a warning message (see cimg::warn()).It is not recommended to throw CImgException instances by yourself, since they are expected to be thrown only by CImg. When an error occurs in a library function call, CImg may display error messages on the screen or on the standard output, depending on the current CImg exception mode. The CImg exception mode can be get and set by functions cimg::exception_mode() and cimg::exception_mode(unsigned int).
In all cases, when an error occurs in CImg, an instance of the corresponding exception class is thrown. This may lead the program to break (this is the default behavior), but you can bypass this behavior by handling the exceptions by yourself, using a usual try { ... } catch () { ... } block, as in the following example: 
        Copyrights (C) From october 2004, David Tschumperlé - GREYC UMR CNRS 6072, Image team.
        Copyrights (C) January->September 2004, David Tschumperlé.
        Copyrights (C) 2000->2003, David Tschumperlé - INRIA Sophia-Antipolis. Odyssée group.