Magick++ 7.0.10

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