Software: Apache/2.0.54 (Unix) mod_perl/1.99_09 Perl/v5.8.0 mod_ssl/2.0.54 OpenSSL/0.9.7l DAV/2 FrontPage/5.0.2.2635 PHP/4.4.0 mod_gzip/2.0.26.1a uname -a: Linux snow.he.net 4.4.276-v2-mono-1 #1 SMP Wed Jul 21 11:21:17 PDT 2021 i686 uid=99(nobody) gid=98(nobody) groups=98(nobody) Safe-mode: OFF (not secure) /usr/doc/ImageMagick-5.5.4-3/Magick++/ drwxr-xr-x | |
| Viewing file: Select action/file-type: Magick::Exception ClassesException represents the base class of objects thrown when ImageMagick reports an error. Magick++ throws C++ exceptions synchronous with the operation where the error occurred. This allows errors to be trapped within the enclosing code (perhaps the code to process a single image) while allowing the code to be written with a simple coding style. A try/catch block should be placed around any sequence of operations which can be considered a unit of work. For example, if your program processes lists of images and some of these images may be defective, by placing the try/catch block around the entire sequence of code that processes one image (including instantiating the image object), you can minimize the overhead of error checking while ensuring that all objects created to deal with that object are safely destroyed (C++ exceptions unroll the stack until the enclosing try block, destroying any created objects). The pseudo code for the main loop of your program may look like: for each image in list This catches errors opening a file first, followed by any Magick++ exception if the exception was not caught previously. The Exception class is derived from the C++ standard exception class. This means that it contains a C++ string containing additional information about the error (e.g to display to the user). Obtain access to this string via the what() method. For example: catch( Exception &error_ )
The classes Warning and Error derive from the Exception class. Exceptions derived from Warning are thrown to represent non-fatal errors which may effect the completeness or quality of the result (e.g. one image provided as an argument to montage is defective). In most cases, a Warning exception may be ignored by catching it immediately, processing it (e.g. printing a diagnostic) and continuing on. Exceptions derived from Error are thrown to represent fatal errors that can not produce a valid result (e.g. attempting to read a file which does not exist). The specific derived exception classes are shown in the following tables: Warning Sub-Classes
Error Sub-Classes
|
:: Command execute :: | |
--[ c99shell v. 1.0 pre-release build #13 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0299 ]-- |