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