Magick++ 7.1.1
Loading...
Searching...
No Matches
Exception.cpp
1// This may look like C code, but it is really -*- C++ -*-
2//
3// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002, 2003
4//
5// Copyright @ 2014 ImageMagick Studio LLC, a non-profit organization
6// dedicated to making software imaging solutions freely available.
7//
8// Implementation of Exception and derived classes
9//
10
11#define MAGICKCORE_IMPLEMENTATION 1
12#define MAGICK_PLUSPLUS_IMPLEMENTATION 1
13
14#include "Magick++/Include.h"
15#include <string>
16#include <errno.h>
17#include <string.h>
18
19using namespace std;
20
21#include "Magick++/Exception.h"
22
23Magick::Exception::Exception(const std::string& what_)
24 : std::exception(),
25 _what(what_),
26 _nested((Exception *) NULL)
27{
28}
29
30Magick::Exception::Exception(const std::string& what_,
31 Exception* nested_)
32 : std::exception(),
33 _what(what_),
34 _nested(nested_)
35{
36}
37
38Magick::Exception::Exception(const Magick::Exception& original_)
39 : exception(original_),
40 _what(original_._what),
41 _nested((Exception *) NULL)
42{
43}
44
45Magick::Exception::~Exception() throw()
46{
47 delete _nested;
48}
49
50Magick::Exception& Magick::Exception::operator=(
51 const Magick::Exception& original_)
52{
53 if (this != &original_)
54 this->_what=original_._what;
55 return(*this);
56}
57
58const char* Magick::Exception::what() const throw()
59{
60 return(_what.c_str());
61}
62
63const Magick::Exception* Magick::Exception::nested() const throw()
64{
65 return(_nested);
66}
67
68void Magick::Exception::nested(Exception* nested_) throw()
69{
70 _nested=nested_;
71}
72
73Magick::Error::Error(const std::string& what_)
74 : Exception(what_)
75{
76}
77
78Magick::Error::Error(const std::string& what_,Exception *nested_)
79 : Exception(what_,nested_)
80{
81}
82
83Magick::Error::~Error() throw()
84{
85}
86
87Magick::ErrorBlob::ErrorBlob(const std::string& what_)
88 : Error(what_)
89{
90}
91
92Magick::ErrorBlob::ErrorBlob(const std::string& what_,Exception *nested_)
93 : Error(what_,nested_)
94{
95}
96
97Magick::ErrorBlob::~ErrorBlob() throw()
98{
99}
100
101Magick::ErrorCache::ErrorCache(const std::string& what_)
102 : Error(what_)
103{
104}
105
106Magick::ErrorCache::ErrorCache(const std::string& what_,Exception *nested_)
107 : Error(what_,nested_)
108{
109}
110
111Magick::ErrorCache::~ErrorCache() throw()
112{
113}
114
115Magick::ErrorCoder::ErrorCoder(const std::string& what_)
116 : Error(what_)
117{
118}
119
120Magick::ErrorCoder::ErrorCoder(const std::string& what_,Exception *nested_)
121 : Error(what_,nested_)
122{
123}
124
125Magick::ErrorCoder::~ErrorCoder() throw()
126{
127}
128
129Magick::ErrorConfigure::ErrorConfigure(const std::string& what_)
130 : Error(what_)
131{
132}
133
134Magick::ErrorConfigure::ErrorConfigure(const std::string& what_,
135 Exception *nested_)
136 : Error(what_,nested_)
137{
138}
139
140Magick::ErrorConfigure::~ErrorConfigure() throw()
141{
142}
143
144Magick::ErrorCorruptImage::ErrorCorruptImage(const std::string& what_)
145 : Error(what_)
146{
147}
148
149Magick::ErrorCorruptImage::ErrorCorruptImage(const std::string& what_,
150 Exception *nested_)
151 : Error(what_,nested_)
152{
153}
154
155Magick::ErrorCorruptImage::~ErrorCorruptImage() throw()
156{
157}
158
159Magick::ErrorDelegate::ErrorDelegate(const std::string& what_)
160 : Error(what_)
161{
162}
163
164Magick::ErrorDelegate::ErrorDelegate(const std::string& what_,
165 Exception *nested_)
166 : Error(what_,nested_)
167{
168}
169
170Magick::ErrorDelegate::~ErrorDelegate()throw()
171{
172}
173
174Magick::ErrorDraw::ErrorDraw(const std::string& what_)
175 : Error(what_)
176{
177}
178
179Magick::ErrorDraw::ErrorDraw(const std::string& what_,Exception *nested_)
180 : Error(what_,nested_)
181{
182}
183
184Magick::ErrorDraw::~ErrorDraw() throw()
185{
186}
187
188Magick::ErrorFileOpen::ErrorFileOpen(const std::string& what_)
189 : Error(what_)
190{
191}
192
193Magick::ErrorFileOpen::~ErrorFileOpen() throw()
194{
195}
196
197Magick::ErrorFileOpen::ErrorFileOpen(const std::string& what_,
198 Exception *nested_)
199 : Error(what_,nested_)
200{
201}
202
203
204Magick::ErrorImage::ErrorImage(const std::string& what_)
205 : Error(what_)
206{
207}
208
209Magick::ErrorImage::ErrorImage(const std::string& what_,Exception *nested_)
210 : Error(what_,nested_)
211{
212}
213
214Magick::ErrorImage::~ErrorImage() throw()
215{
216}
217
218Magick::ErrorMissingDelegate::ErrorMissingDelegate(const std::string& what_)
219 : Error(what_)
220{
221}
222
223Magick::ErrorMissingDelegate::ErrorMissingDelegate(const std::string& what_,
224 Exception *nested_)
225 : Error(what_,nested_)
226{
227}
228
229Magick::ErrorMissingDelegate::~ErrorMissingDelegate() throw ()
230{
231}
232
233Magick::ErrorModule::ErrorModule(const std::string& what_)
234 : Error(what_)
235{
236}
237
238Magick::ErrorModule::ErrorModule(const std::string& what_,Exception *nested_)
239 : Error(what_,nested_)
240{
241}
242
243Magick::ErrorModule::~ErrorModule() throw()
244{
245}
246
247Magick::ErrorMonitor::ErrorMonitor(const std::string& what_)
248 : Error(what_)
249{
250}
251
252Magick::ErrorMonitor::ErrorMonitor(const std::string& what_,Exception *nested_)
253 : Error(what_,nested_)
254{
255}
256
257Magick::ErrorMonitor::~ErrorMonitor() throw()
258{
259}
260
261Magick::ErrorOption::ErrorOption(const std::string& what_)
262 : Error(what_)
263{
264}
265
266Magick::ErrorOption::ErrorOption(const std::string& what_,Exception *nested_)
267 : Error(what_,nested_)
268{
269}
270
271Magick::ErrorOption::~ErrorOption() throw()
272{
273}
274
275Magick::ErrorPolicy::ErrorPolicy(const std::string& what_)
276 : Error(what_)
277{
278}
279
280Magick::ErrorPolicy::ErrorPolicy(const std::string& what_,Exception *nested_)
281 : Error(what_,nested_)
282{
283}
284
285Magick::ErrorPolicy::~ErrorPolicy() throw()
286{
287}
288
289
290Magick::ErrorRegistry::ErrorRegistry(const std::string& what_)
291 : Error(what_)
292{
293}
294
295Magick::ErrorRegistry::ErrorRegistry(const std::string& what_,
296 Exception *nested_)
297 : Error(what_,nested_)
298{
299}
300
301Magick::ErrorRegistry::~ErrorRegistry() throw()
302{
303}
304
305Magick::ErrorResourceLimit::ErrorResourceLimit(const std::string& what_)
306 : Error(what_)
307{
308}
309
310Magick::ErrorResourceLimit::ErrorResourceLimit(const std::string& what_,
311 Exception *nested_)
312 : Error(what_,nested_)
313{
314}
315
316Magick::ErrorResourceLimit::~ErrorResourceLimit() throw()
317{
318}
319
320Magick::ErrorStream::ErrorStream(const std::string& what_)
321 : Error(what_)
322{
323}
324
325Magick::ErrorStream::ErrorStream(const std::string& what_,Exception *nested_)
326 : Error(what_,nested_)
327{
328}
329
330Magick::ErrorStream::~ErrorStream() throw()
331{
332}
333
334Magick::ErrorType::ErrorType(const std::string& what_)
335 : Error(what_)
336{
337}
338
339Magick::ErrorType::ErrorType(const std::string& what_,Exception *nested_)
340 : Error(what_,nested_)
341{
342}
343
344Magick::ErrorType::~ErrorType() throw()
345{
346}
347
348Magick::ErrorUndefined::ErrorUndefined(const std::string& what_)
349 : Error(what_)
350{
351}
352
353Magick::ErrorUndefined::ErrorUndefined(const std::string& what_,
354 Exception *nested_)
355 : Error(what_,nested_)
356{
357}
358
359Magick::ErrorUndefined::~ErrorUndefined() throw()
360{
361}
362
363Magick::ErrorXServer::ErrorXServer(const std::string& what_)
364 : Error(what_)
365{
366}
367
368Magick::ErrorXServer::ErrorXServer(const std::string& what_,Exception *nested_)
369 : Error(what_,nested_)
370{
371}
372
373Magick::ErrorXServer::~ErrorXServer() throw ()
374{
375}
376
377Magick::Warning::Warning(const std::string& what_)
378 : Exception(what_)
379{
380}
381
382Magick::Warning::Warning(const std::string& what_,Exception *nested_)
383 : Exception(what_,nested_)
384{
385}
386
387Magick::Warning::~Warning() throw()
388{
389}
390
391Magick::WarningBlob::WarningBlob(const std::string& what_)
392 : Warning(what_)
393{
394}
395
396Magick::WarningBlob::WarningBlob(const std::string& what_,Exception *nested_)
397 : Warning(what_,nested_)
398{
399}
400
401Magick::WarningBlob::~WarningBlob() throw()
402{
403}
404
405Magick::WarningCache::WarningCache(const std::string& what_)
406 : Warning(what_)
407{
408}
409
410Magick::WarningCache::WarningCache(const std::string& what_,Exception *nested_)
411 : Warning(what_,nested_)
412{
413}
414
415Magick::WarningCache::~WarningCache() throw()
416{
417}
418
419Magick::WarningCoder::WarningCoder(const std::string& what_)
420 : Warning(what_)
421{
422}
423
424Magick::WarningCoder::WarningCoder(const std::string& what_,Exception *nested_)
425 : Warning(what_,nested_)
426{
427}
428
429Magick::WarningCoder::~WarningCoder() throw()
430{
431}
432
433Magick::WarningConfigure::WarningConfigure(const std::string& what_)
434 : Warning(what_)
435{
436}
437
438Magick::WarningConfigure::WarningConfigure(const std::string& what_,
439 Exception *nested_)
440 : Warning(what_,nested_)
441{
442}
443
444Magick::WarningConfigure::~WarningConfigure() throw()
445{
446}
447
448Magick::WarningCorruptImage::WarningCorruptImage(const std::string& what_)
449 : Warning(what_)
450{
451}
452
453Magick::WarningCorruptImage::WarningCorruptImage(const std::string& what_,
454 Exception *nested_)
455 : Warning(what_,nested_)
456{
457}
458
459Magick::WarningCorruptImage::~WarningCorruptImage() throw()
460{
461}
462
463Magick::WarningDelegate::WarningDelegate(const std::string& what_)
464 : Warning(what_)
465{
466}
467
468Magick::WarningDelegate::WarningDelegate(const std::string& what_,
469 Exception *nested_)
470 : Warning(what_,nested_)
471{
472}
473
474Magick::WarningDelegate::~WarningDelegate() throw()
475{
476}
477
478Magick::WarningDraw::WarningDraw(const std::string& what_)
479 : Warning(what_)
480{
481}
482
483Magick::WarningDraw::WarningDraw(const std::string& what_,Exception *nested_)
484 : Warning(what_,nested_)
485{
486}
487
488Magick::WarningDraw::~WarningDraw() throw()
489{
490}
491
492Magick::WarningFileOpen::WarningFileOpen(const std::string& what_)
493 : Warning(what_)
494{
495}
496
497Magick::WarningFileOpen::WarningFileOpen(const std::string& what_,
498 Exception *nested_)
499 : Warning(what_,nested_)
500{
501}
502
503Magick::WarningFileOpen::~WarningFileOpen() throw()
504{
505}
506
507Magick::WarningImage::WarningImage(const std::string& what_)
508 : Warning(what_)
509{
510}
511
512Magick::WarningImage::WarningImage(const std::string& what_,Exception *nested_)
513 : Warning(what_,nested_)
514{
515}
516
517Magick::WarningImage::~WarningImage() throw()
518{
519}
520
521Magick::WarningMissingDelegate::WarningMissingDelegate(
522 const std::string& what_)
523 : Warning(what_)
524{
525}
526
527Magick::WarningMissingDelegate::WarningMissingDelegate(
528 const std::string& what_,Exception *nested_)
529 : Warning(what_,nested_)
530{
531}
532
533Magick::WarningMissingDelegate::~WarningMissingDelegate() throw()
534{
535}
536
537Magick::WarningModule::WarningModule(const std::string& what_)
538 : Warning(what_)
539{
540}
541
542Magick::WarningModule::WarningModule(const std::string& what_,
543 Exception *nested_)
544 : Warning(what_,nested_)
545{
546}
547
548
549Magick::WarningModule::~WarningModule() throw()
550{
551}
552
553Magick::WarningMonitor::WarningMonitor(const std::string& what_)
554 : Warning(what_)
555{
556}
557
558Magick::WarningMonitor::WarningMonitor(const std::string& what_,
559 Exception *nested_)
560 : Warning(what_,nested_)
561{
562}
563
564Magick::WarningMonitor::~WarningMonitor() throw()
565{
566}
567
568Magick::WarningOption::WarningOption(const std::string& what_)
569 : Warning(what_)
570{
571}
572
573Magick::WarningOption::WarningOption(const std::string& what_,
574 Exception *nested_)
575 : Warning(what_,nested_)
576{
577}
578
579Magick::WarningOption::~WarningOption() throw()
580{
581}
582
583Magick::WarningRegistry::WarningRegistry(const std::string& what_)
584 : Warning(what_)
585{
586}
587
588Magick::WarningRegistry::WarningRegistry(const std::string& what_,
589 Exception *nested_)
590 : Warning(what_,nested_)
591{
592}
593
594Magick::WarningRegistry::~WarningRegistry() throw()
595{
596}
597
598Magick::WarningPolicy::WarningPolicy(const std::string& what_)
599 : Warning(what_)
600{
601}
602
603Magick::WarningPolicy::WarningPolicy(const std::string& what_,
604 Exception *nested_)
605 : Warning(what_,nested_)
606{
607}
608
609Magick::WarningPolicy::~WarningPolicy() throw()
610{
611}
612
613Magick::WarningResourceLimit::WarningResourceLimit(const std::string& what_)
614 : Warning(what_)
615{
616}
617
618Magick::WarningResourceLimit::WarningResourceLimit(const std::string& what_,
619 Exception *nested_)
620 : Warning(what_,nested_)
621{
622}
623
624Magick::WarningResourceLimit::~WarningResourceLimit() throw()
625{
626}
627
628Magick::WarningStream::WarningStream(const std::string& what_)
629 : Warning(what_)
630{
631}
632
633Magick::WarningStream::WarningStream(const std::string& what_,
634 Exception *nested_)
635 : Warning(what_,nested_)
636{
637}
638
639Magick::WarningStream::~WarningStream() throw()
640{
641}
642
643Magick::WarningType::WarningType(const std::string& what_)
644 : Warning(what_)
645{
646}
647
648Magick::WarningType::WarningType(const std::string& what_,Exception *nested_)
649 : Warning(what_,nested_)
650{
651}
652
653Magick::WarningType::~WarningType() throw()
654{
655}
656
657Magick::WarningUndefined::WarningUndefined(const std::string& what_)
658 : Warning(what_)
659{
660}
661
662Magick::WarningUndefined::WarningUndefined(const std::string& what_,
663 Exception *nested_)
664 : Warning(what_,nested_)
665{
666}
667
668Magick::WarningUndefined::~WarningUndefined() throw()
669{
670}
671
672Magick::WarningXServer::WarningXServer(const std::string& what_)
673 : Warning(what_)
674{
675}
676
677Magick::WarningXServer::WarningXServer(const std::string& what_,
678 Exception *nested_)
679 : Warning(what_,nested_)
680{
681}
682
683Magick::WarningXServer::~WarningXServer() throw()
684{
685}
686
687std::string Magick::formatExceptionMessage(const MagickCore::ExceptionInfo *exception_)
688{
689 // Format error message ImageMagick-style
690 std::string message=GetClientName();
691 if (exception_->reason != (char *) NULL)
692 {
693 message+=std::string(": ");
694 message+=std::string(exception_->reason);
695 }
696
697 if (exception_->description != (char *) NULL)
698 message += " (" + std::string(exception_->description) + ")";
699 return(message);
700}
701
702Magick::Exception* Magick::createException(const MagickCore::ExceptionInfo *exception_)
703{
704 std::string message=formatExceptionMessage(exception_);
705 switch (exception_->severity)
706 {
707 case MagickCore::BlobError:
708 case MagickCore::BlobFatalError:
709 return new ErrorBlob(message);
710 case MagickCore::BlobWarning:
711 return new WarningBlob(message);
712 case MagickCore::CacheError:
713 case MagickCore::CacheFatalError:
714 return new ErrorCache(message);
715 case MagickCore::CacheWarning:
716 return new WarningCache(message);
717 case MagickCore::CoderError:
718 case MagickCore::CoderFatalError:
719 return new ErrorCoder(message);
720 case MagickCore::CoderWarning:
721 return new WarningCoder(message);
722 case MagickCore::ConfigureError:
723 case MagickCore::ConfigureFatalError:
724 return new ErrorConfigure(message);
725 case MagickCore::ConfigureWarning:
726 return new WarningConfigure(message);
727 case MagickCore::CorruptImageError:
728 case MagickCore::CorruptImageFatalError:
729 return new ErrorCorruptImage(message);
730 case MagickCore::CorruptImageWarning:
731 return new WarningCorruptImage(message);
732 case MagickCore::DelegateError:
733 case MagickCore::DelegateFatalError:
734 return new ErrorDelegate(message);
735 case MagickCore::DelegateWarning:
736 return new WarningDelegate(message);
737 case MagickCore::DrawError:
738 case MagickCore::DrawFatalError:
739 return new ErrorDraw(message);
740 case MagickCore::DrawWarning:
741 return new WarningDraw(message);
742 case MagickCore::FileOpenError:
743 case MagickCore::FileOpenFatalError:
744 return new ErrorFileOpen(message);
745 case MagickCore::FileOpenWarning:
746 return new WarningFileOpen(message);
747 case MagickCore::ImageError:
748 case MagickCore::ImageFatalError:
749 return new ErrorImage(message);
750 case MagickCore::ImageWarning:
751 return new WarningImage(message);
752 case MagickCore::MissingDelegateError:
753 case MagickCore::MissingDelegateFatalError:
754 return new ErrorMissingDelegate(message);
755 case MagickCore::MissingDelegateWarning:
756 return new WarningMissingDelegate(message);
757 case MagickCore::ModuleError:
758 case MagickCore::ModuleFatalError:
759 return new ErrorModule(message);
760 case MagickCore::ModuleWarning:
761 return new WarningModule(message);
762 case MagickCore::MonitorError:
763 case MagickCore::MonitorFatalError:
764 return new ErrorMonitor(message);
765 case MagickCore::MonitorWarning:
766 return new WarningMonitor(message);
767 case MagickCore::OptionError:
768 case MagickCore::OptionFatalError:
769 return new ErrorOption(message);
770 case MagickCore::OptionWarning:
771 return new WarningOption(message);
772 case MagickCore::PolicyWarning:
773 return new WarningPolicy(message);
774 case MagickCore::PolicyError:
775 case MagickCore::PolicyFatalError:
776 return new ErrorPolicy(message);
777 case MagickCore::RegistryError:
778 case MagickCore::RegistryFatalError:
779 return new ErrorRegistry(message);
780 case MagickCore::RegistryWarning:
781 return new WarningRegistry(message);
782 case MagickCore::ResourceLimitError:
783 case MagickCore::ResourceLimitFatalError:
784 return new ErrorResourceLimit(message);
785 case MagickCore::ResourceLimitWarning:
786 return new WarningResourceLimit(message);
787 case MagickCore::StreamError:
788 case MagickCore::StreamFatalError:
789 return new ErrorStream(message);
790 case MagickCore::StreamWarning:
791 return new WarningStream(message);
792 case MagickCore::TypeError:
793 case MagickCore::TypeFatalError:
794 return new ErrorType(message);
795 case MagickCore::TypeWarning:
796 return new WarningType(message);
797 case MagickCore::UndefinedException:
798 default:
799 return new ErrorUndefined(message);
800 case MagickCore::XServerError:
801 case MagickCore::XServerFatalError:
802 return new ErrorXServer(message);
803 case MagickCore::XServerWarning:
804 return new WarningXServer(message);
805 }
806}
807
808MagickPPExport void Magick::throwExceptionExplicit(
809 const MagickCore::ExceptionType severity_,const char* reason_,
810 const char* description_)
811{
812 // Just return if there is no reported error
813 if (severity_ == MagickCore::UndefinedException)
814 return;
815
816 GetPPException;
817 ThrowException(exceptionInfo,severity_,reason_,description_);
818 ThrowPPException(false);
819}
820
821MagickPPExport void Magick::throwException(ExceptionInfo *exception_,
822 const bool quiet_)
823{
824 const ExceptionInfo
825 *p;
826
827 Exception
828 *nestedException,
829 *q;
830
831 MagickCore::ExceptionType
832 severity;
833
834 size_t
835 index;
836
837 std::string
838 message;
839
840 // Just return if there is no reported error
841 if (exception_->severity == MagickCore::UndefinedException)
842 return;
843
844 message=formatExceptionMessage(exception_);
845 nestedException=(Exception *) NULL;
846 q=(Exception *) NULL;
847 LockSemaphoreInfo(exception_->semaphore);
848 if (exception_->exceptions != (void *) NULL)
849 {
850 index=GetNumberOfElementsInLinkedList((LinkedListInfo *)
851 exception_->exceptions);
852 while(index > 0)
853 {
854 p=(const ExceptionInfo *) GetValueFromLinkedList((LinkedListInfo *)
855 exception_->exceptions,--index);
856 if ((p->severity != exception_->severity) || (LocaleCompare(p->reason,
857 exception_->reason) != 0) || (LocaleCompare(p->description,
858 exception_->description) != 0))
859 {
860 if (nestedException == (Exception *) NULL)
861 {
862 nestedException=createException(p);
863 q=nestedException;
864 }
865 else
866 {
867 Exception
868 *r;
869
870 r=createException(p);
871 q->nested(r);
872 q=r;
873 }
874 }
875 }
876 }
877 severity=exception_->severity;
878 UnlockSemaphoreInfo(exception_->semaphore);
879
880 if ((quiet_) && (severity < MagickCore::ErrorException))
881 {
882 delete nestedException;
883 return;
884 }
885
886 DestroyExceptionInfo(exception_);
887
888 switch (severity)
889 {
890 case MagickCore::BlobError:
891 case MagickCore::BlobFatalError:
892 throw ErrorBlob(message,nestedException);
893 case MagickCore::BlobWarning:
894 throw WarningBlob(message,nestedException);
895 case MagickCore::CacheError:
896 case MagickCore::CacheFatalError:
897 throw ErrorCache(message,nestedException);
898 case MagickCore::CacheWarning:
899 throw WarningCache(message,nestedException);
900 case MagickCore::CoderError:
901 case MagickCore::CoderFatalError:
902 throw ErrorCoder(message,nestedException);
903 case MagickCore::CoderWarning:
904 throw WarningCoder(message,nestedException);
905 case MagickCore::ConfigureError:
906 case MagickCore::ConfigureFatalError:
907 throw ErrorConfigure(message,nestedException);
908 case MagickCore::ConfigureWarning:
909 throw WarningConfigure(message,nestedException);
910 case MagickCore::CorruptImageError:
911 case MagickCore::CorruptImageFatalError:
912 throw ErrorCorruptImage(message,nestedException);
913 case MagickCore::CorruptImageWarning:
914 throw WarningCorruptImage(message,nestedException);
915 case MagickCore::DelegateError:
916 case MagickCore::DelegateFatalError:
917 throw ErrorDelegate(message,nestedException);
918 case MagickCore::DelegateWarning:
919 throw WarningDelegate(message,nestedException);
920 case MagickCore::DrawError:
921 case MagickCore::DrawFatalError:
922 throw ErrorDraw(message,nestedException);
923 case MagickCore::DrawWarning:
924 throw WarningDraw(message,nestedException);
925 case MagickCore::FileOpenError:
926 case MagickCore::FileOpenFatalError:
927 throw ErrorFileOpen(message,nestedException);
928 case MagickCore::FileOpenWarning:
929 throw WarningFileOpen(message,nestedException);
930 case MagickCore::ImageError:
931 case MagickCore::ImageFatalError:
932 throw ErrorImage(message,nestedException);
933 case MagickCore::ImageWarning:
934 throw WarningImage(message,nestedException);
935 case MagickCore::MissingDelegateError:
936 case MagickCore::MissingDelegateFatalError:
937 throw ErrorMissingDelegate(message,nestedException);
938 case MagickCore::MissingDelegateWarning:
939 throw WarningMissingDelegate(message,nestedException);
940 case MagickCore::ModuleError:
941 case MagickCore::ModuleFatalError:
942 throw ErrorModule(message,nestedException);
943 case MagickCore::ModuleWarning:
944 throw WarningModule(message,nestedException);
945 case MagickCore::MonitorError:
946 case MagickCore::MonitorFatalError:
947 throw ErrorMonitor(message,nestedException);
948 case MagickCore::MonitorWarning:
949 throw WarningMonitor(message,nestedException);
950 case MagickCore::OptionError:
951 case MagickCore::OptionFatalError:
952 throw ErrorOption(message,nestedException);
953 case MagickCore::OptionWarning:
954 throw WarningOption(message,nestedException);
955 case MagickCore::PolicyWarning:
956 throw WarningPolicy(message,nestedException);
957 case MagickCore::PolicyError:
958 case MagickCore::PolicyFatalError:
959 throw ErrorPolicy(message,nestedException);
960 case MagickCore::RegistryError:
961 case MagickCore::RegistryFatalError:
962 throw ErrorRegistry(message,nestedException);
963 case MagickCore::RegistryWarning:
964 throw WarningRegistry(message,nestedException);
965 case MagickCore::ResourceLimitError:
966 case MagickCore::ResourceLimitFatalError:
967 throw ErrorResourceLimit(message,nestedException);
968 case MagickCore::ResourceLimitWarning:
969 throw WarningResourceLimit(message,nestedException);
970 case MagickCore::StreamError:
971 case MagickCore::StreamFatalError:
972 throw ErrorStream(message,nestedException);
973 case MagickCore::StreamWarning:
974 throw WarningStream(message,nestedException);
975 case MagickCore::TypeError:
976 case MagickCore::TypeFatalError:
977 throw ErrorType(message,nestedException);
978 case MagickCore::TypeWarning:
979 throw WarningType(message,nestedException);
980 case MagickCore::UndefinedException:
981 default:
982 throw ErrorUndefined(message,nestedException);
983 case MagickCore::XServerError:
984 case MagickCore::XServerFatalError:
985 throw ErrorXServer(message,nestedException);
986 case MagickCore::XServerWarning:
987 throw WarningXServer(message,nestedException);
988 }
989}