Magick++ 7.1.0

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 //
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
19 using namespace std;
20
21 #include "Magick++/Exception.h"
22
23 Magick::Exception::Exception(const std::string& what_)
24 : std::exception(),
25 _what(what_),
26 _nested((Exception *) NULL)
27 {
28 }
29
30 Magick::Exception::Exception(const std::string& what_,
31 Exception* nested_)
32 : std::exception(),
33 _what(what_),
34 _nested(nested_)
35 {
36 }
37
38 Magick::Exception::Exception(const Magick::Exception& original_)
39 : exception(original_),
40 _what(original_._what),
41 _nested((Exception *) NULL)
42 {
43 }
44
45 Magick::Exception::~Exception() throw()
46 {
47 delete _nested;
48 }
49
50 Magick::Exception& Magick::Exception::operator=(
51 const Magick::Exception& original_)
52 {
53 if (this != &original_)
54 this->_what=original_._what;
55 return(*this);
56 }
57
58 const char* Magick::Exception::what() const throw()
59 {
60 return(_what.c_str());
61 }
62
63 const Magick::Exception* Magick::Exception::nested() const throw()
64 {
65 return(_nested);
66 }
67
68 void Magick::Exception::nested(Exception* nested_) throw()
69 {
70 _nested=nested_;
71 }
72
73 Magick::Error::Error(const std::string& what_)
74 : Exception(what_)
75 {
76 }
77
78 Magick::Error::Error(const std::string& what_,Exception *nested_)
79 : Exception(what_,nested_)
80 {
81 }
82
83 Magick::Error::~Error() throw()
84 {
85 }
86
87 Magick::ErrorBlob::ErrorBlob(const std::string& what_)
88 : Error(what_)
89 {
90 }
91
92 Magick::ErrorBlob::ErrorBlob(const std::string& what_,Exception *nested_)
93 : Error(what_,nested_)
94 {
95 }
96
97 Magick::ErrorBlob::~ErrorBlob() throw()
98 {
99 }
100
101 Magick::ErrorCache::ErrorCache(const std::string& what_)
102 : Error(what_)
103 {
104 }
105
106 Magick::ErrorCache::ErrorCache(const std::string& what_,Exception *nested_)
107 : Error(what_,nested_)
108 {
109 }
110
111 Magick::ErrorCache::~ErrorCache() throw()
112 {
113 }
114
115 Magick::ErrorCoder::ErrorCoder(const std::string& what_)
116 : Error(what_)
117 {
118 }
119
120 Magick::ErrorCoder::ErrorCoder(const std::string& what_,Exception *nested_)
121 : Error(what_,nested_)
122 {
123 }
124
125 Magick::ErrorCoder::~ErrorCoder() throw()
126 {
127 }
128
129 Magick::ErrorConfigure::ErrorConfigure(const std::string& what_)
130 : Error(what_)
131 {
132 }
133
134 Magick::ErrorConfigure::ErrorConfigure(const std::string& what_,
135 Exception *nested_)
136 : Error(what_,nested_)
137 {
138 }
139
140 Magick::ErrorConfigure::~ErrorConfigure() throw()
141 {
142 }
143
144 Magick::ErrorCorruptImage::ErrorCorruptImage(const std::string& what_)
145 : Error(what_)
146 {
147 }
148
149 Magick::ErrorCorruptImage::ErrorCorruptImage(const std::string& what_,
150 Exception *nested_)
151 : Error(what_,nested_)
152 {
153 }
154
155 Magick::ErrorCorruptImage::~ErrorCorruptImage() throw()
156 {
157 }
158
159 Magick::ErrorDelegate::ErrorDelegate(const std::string& what_)
160 : Error(what_)
161 {
162 }
163
164 Magick::ErrorDelegate::ErrorDelegate(const std::string& what_,
165 Exception *nested_)
166 : Error(what_,nested_)
167 {
168 }
169
170 Magick::ErrorDelegate::~ErrorDelegate()throw()
171 {
172 }
173
174 Magick::ErrorDraw::ErrorDraw(const std::string& what_)
175 : Error(what_)
176 {
177 }
178
179 Magick::ErrorDraw::ErrorDraw(const std::string& what_,Exception *nested_)
180 : Error(what_,nested_)
181 {
182 }
183
184 Magick::ErrorDraw::~ErrorDraw() throw()
185 {
186 }
187
188 Magick::ErrorFileOpen::ErrorFileOpen(const std::string& what_)
189 : Error(what_)
190 {
191 }
192
193 Magick::ErrorFileOpen::~ErrorFileOpen() throw()
194 {
195 }
196
197 Magick::ErrorFileOpen::ErrorFileOpen(const std::string& what_,
198 Exception *nested_)
199 : Error(what_,nested_)
200 {
201 }
202
203
204 Magick::ErrorImage::ErrorImage(const std::string& what_)
205 : Error(what_)
206 {
207 }
208
209 Magick::ErrorImage::ErrorImage(const std::string& what_,Exception *nested_)
210 : Error(what_,nested_)
211 {
212 }
213
214 Magick::ErrorImage::~ErrorImage() throw()
215 {
216 }
217
218 Magick::ErrorMissingDelegate::ErrorMissingDelegate(const std::string& what_)
219 : Error(what_)
220 {
221 }
222
223 Magick::ErrorMissingDelegate::ErrorMissingDelegate(const std::string& what_,
224 Exception *nested_)
225 : Error(what_,nested_)
226 {
227 }
228
229 Magick::ErrorMissingDelegate::~ErrorMissingDelegate() throw ()
230 {
231 }
232
233 Magick::ErrorModule::ErrorModule(const std::string& what_)
234 : Error(what_)
235 {
236 }
237
238 Magick::ErrorModule::ErrorModule(const std::string& what_,Exception *nested_)
239 : Error(what_,nested_)
240 {
241 }
242
243 Magick::ErrorModule::~ErrorModule() throw()
244 {
245 }
246
247 Magick::ErrorMonitor::ErrorMonitor(const std::string& what_)
248 : Error(what_)
249 {
250 }
251
252 Magick::ErrorMonitor::ErrorMonitor(const std::string& what_,Exception *nested_)
253 : Error(what_,nested_)
254 {
255 }
256
257 Magick::ErrorMonitor::~ErrorMonitor() throw()
258 {
259 }
260
261 Magick::ErrorOption::ErrorOption(const std::string& what_)
262 : Error(what_)
263 {
264 }
265
266 Magick::ErrorOption::ErrorOption(const std::string& what_,Exception *nested_)
267 : Error(what_,nested_)
268 {
269 }
270
271 Magick::ErrorOption::~ErrorOption() throw()
272 {
273 }
274
275 Magick::ErrorPolicy::ErrorPolicy(const std::string& what_)
276 : Error(what_)
277 {
278 }
279
280 Magick::ErrorPolicy::ErrorPolicy(const std::string& what_,Exception *nested_)
281 : Error(what_,nested_)
282 {
283 }
284
285 Magick::ErrorPolicy::~ErrorPolicy() throw()
286 {
287 }
288
289
290 Magick::ErrorRegistry::ErrorRegistry(const std::string& what_)
291 : Error(what_)
292 {
293 }
294
295 Magick::ErrorRegistry::ErrorRegistry(const std::string& what_,
296 Exception *nested_)
297 : Error(what_,nested_)
298 {
299 }
300
301 Magick::ErrorRegistry::~ErrorRegistry() throw()
302 {
303 }
304
305 Magick::ErrorResourceLimit::ErrorResourceLimit(const std::string& what_)
306 : Error(what_)
307 {
308 }
309
310 Magick::ErrorResourceLimit::ErrorResourceLimit(const std::string& what_,
311 Exception *nested_)
312 : Error(what_,nested_)
313 {
314 }
315
316 Magick::ErrorResourceLimit::~ErrorResourceLimit() throw()
317 {
318 }
319
320 Magick::ErrorStream::ErrorStream(const std::string& what_)
321 : Error(what_)
322 {
323 }
324
325 Magick::ErrorStream::ErrorStream(const std::string& what_,Exception *nested_)
326 : Error(what_,nested_)
327 {
328 }
329
330 Magick::ErrorStream::~ErrorStream() throw()
331 {
332 }
333
334 Magick::ErrorType::ErrorType(const std::string& what_)
335 : Error(what_)
336 {
337 }
338
339 Magick::ErrorType::ErrorType(const std::string& what_,Exception *nested_)
340 : Error(what_,nested_)
341 {
342 }
343
344 Magick::ErrorType::~ErrorType() throw()
345 {
346 }
347
348 Magick::ErrorUndefined::ErrorUndefined(const std::string& what_)
349 : Error(what_)
350 {
351 }
352
353 Magick::ErrorUndefined::ErrorUndefined(const std::string& what_,
354 Exception *nested_)
355 : Error(what_,nested_)
356 {
357 }
358
359 Magick::ErrorUndefined::~ErrorUndefined() throw()
360 {
361 }
362
363 Magick::ErrorXServer::ErrorXServer(const std::string& what_)
364 : Error(what_)
365 {
366 }
367
368 Magick::ErrorXServer::ErrorXServer(const std::string& what_,Exception *nested_)
369 : Error(what_,nested_)
370 {
371 }
372
373 Magick::ErrorXServer::~ErrorXServer() throw ()
374 {
375 }
376
377 Magick::Warning::Warning(const std::string& what_)
378 : Exception(what_)
379 {
380 }
381
382 Magick::Warning::Warning(const std::string& what_,Exception *nested_)
383 : Exception(what_,nested_)
384 {
385 }
386
387 Magick::Warning::~Warning() throw()
388 {
389 }
390
391 Magick::WarningBlob::WarningBlob(const std::string& what_)
392 : Warning(what_)
393 {
394 }
395
396 Magick::WarningBlob::WarningBlob(const std::string& what_,Exception *nested_)
397 : Warning(what_,nested_)
398 {
399 }
400
401 Magick::WarningBlob::~WarningBlob() throw()
402 {
403 }
404
405 Magick::WarningCache::WarningCache(const std::string& what_)
406 : Warning(what_)
407 {
408 }
409
410 Magick::WarningCache::WarningCache(const std::string& what_,Exception *nested_)
411 : Warning(what_,nested_)
412 {
413 }
414
415 Magick::WarningCache::~WarningCache() throw()
416 {
417 }
418
419 Magick::WarningCoder::WarningCoder(const std::string& what_)
420 : Warning(what_)
421 {
422 }
423
424 Magick::WarningCoder::WarningCoder(const std::string& what_,Exception *nested_)
425 : Warning(what_,nested_)
426 {
427 }
428
429 Magick::WarningCoder::~WarningCoder() throw()
430 {
431 }
432
433 Magick::WarningConfigure::WarningConfigure(const std::string& what_)
434 : Warning(what_)
435 {
436 }
437
438 Magick::WarningConfigure::WarningConfigure(const std::string& what_,
439 Exception *nested_)
440 : Warning(what_,nested_)
441 {
442 }
443
444 Magick::WarningConfigure::~WarningConfigure() throw()
445 {
446 }
447
448 Magick::WarningCorruptImage::WarningCorruptImage(const std::string& what_)
449 : Warning(what_)
450 {
451 }
452
453 Magick::WarningCorruptImage::WarningCorruptImage(const std::string& what_,
454 Exception *nested_)
455 : Warning(what_,nested_)
456 {
457 }
458
459 Magick::WarningCorruptImage::~WarningCorruptImage() throw()
460 {
461 }
462
463 Magick::WarningDelegate::WarningDelegate(const std::string& what_)
464 : Warning(what_)
465 {
466 }
467
468 Magick::WarningDelegate::WarningDelegate(const std::string& what_,
469 Exception *nested_)
470 : Warning(what_,nested_)
471 {
472 }
473
474 Magick::WarningDelegate::~WarningDelegate() throw()
475 {
476 }
477
478 Magick::WarningDraw::WarningDraw(const std::string& what_)
479 : Warning(what_)
480 {
481 }
482
483 Magick::WarningDraw::WarningDraw(const std::string& what_,Exception *nested_)
484 : Warning(what_,nested_)
485 {
486 }
487
488 Magick::WarningDraw::~WarningDraw() throw()
489 {
490 }
491
492 Magick::WarningFileOpen::WarningFileOpen(const std::string& what_)
493 : Warning(what_)
494 {
495 }
496
497 Magick::WarningFileOpen::WarningFileOpen(const std::string& what_,
498 Exception *nested_)
499 : Warning(what_,nested_)
500 {
501 }
502
503 Magick::WarningFileOpen::~WarningFileOpen() throw()
504 {
505 }
506
507 Magick::WarningImage::WarningImage(const std::string& what_)
508 : Warning(what_)
509 {
510 }
511
512 Magick::WarningImage::WarningImage(const std::string& what_,Exception *nested_)
513 : Warning(what_,nested_)
514 {
515 }
516
517 Magick::WarningImage::~WarningImage() throw()
518 {
519 }
520
521 Magick::WarningMissingDelegate::WarningMissingDelegate(
522 const std::string& what_)
523 : Warning(what_)
524 {
525 }
526
527 Magick::WarningMissingDelegate::WarningMissingDelegate(
528 const std::string& what_,Exception *nested_)
529 : Warning(what_,nested_)
530 {
531 }
532
533 Magick::WarningMissingDelegate::~WarningMissingDelegate() throw()
534 {
535 }
536
537 Magick::WarningModule::WarningModule(const std::string& what_)
538 : Warning(what_)
539 {
540 }
541
542 Magick::WarningModule::WarningModule(const std::string& what_,
543 Exception *nested_)
544 : Warning(what_,nested_)
545 {
546 }
547
548
549 Magick::WarningModule::~WarningModule() throw()
550 {
551 }
552
553 Magick::WarningMonitor::WarningMonitor(const std::string& what_)
554 : Warning(what_)
555 {
556 }
557
558 Magick::WarningMonitor::WarningMonitor(const std::string& what_,
559 Exception *nested_)
560 : Warning(what_,nested_)
561 {
562 }
563
564 Magick::WarningMonitor::~WarningMonitor() throw()
565 {
566 }
567
568 Magick::WarningOption::WarningOption(const std::string& what_)
569 : Warning(what_)
570 {
571 }
572
573 Magick::WarningOption::WarningOption(const std::string& what_,
574 Exception *nested_)
575 : Warning(what_,nested_)
576 {
577 }
578
579 Magick::WarningOption::~WarningOption() throw()
580 {
581 }
582
583 Magick::WarningRegistry::WarningRegistry(const std::string& what_)
584 : Warning(what_)
585 {
586 }
587
588 Magick::WarningRegistry::WarningRegistry(const std::string& what_,
589 Exception *nested_)
590 : Warning(what_,nested_)
591 {
592 }
593
594 Magick::WarningRegistry::~WarningRegistry() throw()
595 {
596 }
597
598 Magick::WarningPolicy::WarningPolicy(const std::string& what_)
599 : Warning(what_)
600 {
601 }
602
603 Magick::WarningPolicy::WarningPolicy(const std::string& what_,
604 Exception *nested_)
605 : Warning(what_,nested_)
606 {
607 }
608
609 Magick::WarningPolicy::~WarningPolicy() throw()
610 {
611 }
612
613 Magick::WarningResourceLimit::WarningResourceLimit(const std::string& what_)
614 : Warning(what_)
615 {
616 }
617
618 Magick::WarningResourceLimit::WarningResourceLimit(const std::string& what_,
619 Exception *nested_)
620 : Warning(what_,nested_)
621 {
622 }
623
624 Magick::WarningResourceLimit::~WarningResourceLimit() throw()
625 {
626 }
627
628 Magick::WarningStream::WarningStream(const std::string& what_)
629 : Warning(what_)
630 {
631 }
632
633 Magick::WarningStream::WarningStream(const std::string& what_,
634 Exception *nested_)
635 : Warning(what_,nested_)
636 {
637 }
638
639 Magick::WarningStream::~WarningStream() throw()
640 {
641 }
642
643 Magick::WarningType::WarningType(const std::string& what_)
644 : Warning(what_)
645 {
646 }
647
648 Magick::WarningType::WarningType(const std::string& what_,Exception *nested_)
649 : Warning(what_,nested_)
650 {
651 }
652
653 Magick::WarningType::~WarningType() throw()
654 {
655 }
656
657 Magick::WarningUndefined::WarningUndefined(const std::string& what_)
658 : Warning(what_)
659 {
660 }
661
662 Magick::WarningUndefined::WarningUndefined(const std::string& what_,
663 Exception *nested_)
664 : Warning(what_,nested_)
665 {
666 }
667
668 Magick::WarningUndefined::~WarningUndefined() throw()
669 {
670 }
671
672 Magick::WarningXServer::WarningXServer(const std::string& what_)
673 : Warning(what_)
674 {
675 }
676
677 Magick::WarningXServer::WarningXServer(const std::string& what_,
678 Exception *nested_)
679 : Warning(what_,nested_)
680 {
681 }
682
683 Magick::WarningXServer::~WarningXServer() throw()
684 {
685 }
686
687 std::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
702 Magick::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
808 MagickPPExport 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
821 MagickPPExport 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 }
Magick::Exception::what
virtual const char * what() const
Definition: Exception.cpp:58
Magick::WarningMissingDelegate::WarningMissingDelegate
WarningMissingDelegate(const std::string &what_)
Definition: Exception.cpp:521
Magick::WarningFileOpen
Definition: Exception.h:302
Magick::WarningXServer::WarningXServer
WarningXServer(const std::string &what_)
Definition: Exception.cpp:672
Magick::ErrorPolicy::~ErrorPolicy
~ErrorPolicy()
Definition: Exception.cpp:285
Magick::WarningCoder
Definition: Exception.h:262
Magick::WarningConfigure::WarningConfigure
WarningConfigure(const std::string &what_)
Definition: Exception.cpp:433
Magick::ErrorImage
Definition: Exception.h:138
Magick::ErrorDelegate::ErrorDelegate
ErrorDelegate(const std::string &what_)
Definition: Exception.cpp:159
Magick::ErrorImage::ErrorImage
ErrorImage(const std::string &what_)
Definition: Exception.cpp:204
Magick::WarningRegistry
Definition: Exception.h:359
Magick::WarningDraw::WarningDraw
WarningDraw(const std::string &what_)
Definition: Exception.cpp:478
Magick::WarningMissingDelegate
Definition: Exception.h:318
Magick::WarningCoder::WarningCoder
WarningCoder(const std::string &what_)
Definition: Exception.cpp:419
Magick::ErrorDraw
Definition: Exception.h:122
Magick::WarningXServer
Definition: Exception.h:399
Magick::Error
Definition: Exception.h:66
Magick::WarningCorruptImage::~WarningCorruptImage
~WarningCorruptImage()
Definition: Exception.cpp:459
Magick::ErrorDelegate
Definition: Exception.h:114
Magick::WarningMonitor::WarningMonitor
WarningMonitor(const std::string &what_)
Definition: Exception.cpp:553
Magick::ErrorFileOpen::ErrorFileOpen
ErrorFileOpen(const std::string &what_)
Definition: Exception.cpp:188
Magick::ErrorOption::~ErrorOption
~ErrorOption()
Definition: Exception.cpp:271
Magick::Error::Error
Error(const std::string &what_)
Definition: Exception.cpp:73
Magick::ErrorMonitor
Definition: Exception.h:162
Magick::ErrorUndefined::ErrorUndefined
ErrorUndefined(const std::string &what_)
Definition: Exception.cpp:348
Magick::WarningOption::WarningOption
WarningOption(const std::string &what_)
Definition: Exception.cpp:568
Magick::ErrorType::~ErrorType
~ErrorType()
Definition: Exception.cpp:344
Magick::WarningRegistry::WarningRegistry
WarningRegistry(const std::string &what_)
Definition: Exception.cpp:583
Magick::ErrorFileOpen
Definition: Exception.h:130
std
STL namespace.
Magick::ErrorFileOpen::~ErrorFileOpen
~ErrorFileOpen()
Definition: Exception.cpp:193
Magick::WarningUndefined::~WarningUndefined
~WarningUndefined()
Definition: Exception.cpp:668
Magick::ErrorRegistry::~ErrorRegistry
~ErrorRegistry()
Definition: Exception.cpp:301
Magick::WarningOption::~WarningOption
~WarningOption()
Definition: Exception.cpp:579
Magick::WarningCache::~WarningCache
~WarningCache()
Definition: Exception.cpp:415
Magick::WarningDelegate::WarningDelegate
WarningDelegate(const std::string &what_)
Definition: Exception.cpp:463
Magick::ErrorOption
Definition: Exception.h:170
Magick::ErrorConfigure
Definition: Exception.h:98
Magick::WarningDraw::~WarningDraw
~WarningDraw()
Definition: Exception.cpp:488
Magick::ErrorXServer::~ErrorXServer
~ErrorXServer()
Definition: Exception.cpp:373
Magick::WarningStream::WarningStream
WarningStream(const std::string &what_)
Definition: Exception.cpp:628
Magick::WarningFileOpen::~WarningFileOpen
~WarningFileOpen()
Definition: Exception.cpp:503
Magick::WarningMonitor
Definition: Exception.h:335
Magick::WarningPolicy::WarningPolicy
WarningPolicy(const std::string &what_)
Definition: Exception.cpp:598
Magick::Exception::nested
const Exception * nested() const
Definition: Exception.cpp:63
Magick::WarningPolicy
Definition: Exception.h:351
Magick::formatExceptionMessage
std::string formatExceptionMessage(const MagickCore::ExceptionInfo *exception_)
Definition: Exception.cpp:687
Magick::ErrorMissingDelegate::~ErrorMissingDelegate
~ErrorMissingDelegate()
Definition: Exception.cpp:229
Magick::ErrorRegistry::ErrorRegistry
ErrorRegistry(const std::string &what_)
Definition: Exception.cpp:290
Magick::ErrorCache::~ErrorCache
~ErrorCache()
Definition: Exception.cpp:111
Magick::throwException
MagickPPExport void throwException(MagickCore::ExceptionInfo *exception_, const bool quiet_=false)
Magick::ErrorBlob
Definition: Exception.h:74
Magick::WarningResourceLimit::WarningResourceLimit
WarningResourceLimit(const std::string &what_)
Definition: Exception.cpp:613
Magick::WarningOption
Definition: Exception.h:343
Magick::WarningPolicy::~WarningPolicy
~WarningPolicy()
Definition: Exception.cpp:609
Magick::WarningModule::WarningModule
WarningModule(const std::string &what_)
Definition: Exception.cpp:537
Magick::WarningBlob
Definition: Exception.h:246
Magick::WarningModule::~WarningModule
~WarningModule()
Definition: Exception.cpp:549
Magick::ErrorResourceLimit
Definition: Exception.h:194
Magick::ErrorRegistry
Definition: Exception.h:186
Magick::ErrorCorruptImage
Definition: Exception.h:106
Magick::WarningUndefined::WarningUndefined
WarningUndefined(const std::string &what_)
Definition: Exception.cpp:657
Magick::WarningBlob::WarningBlob
WarningBlob(const std::string &what_)
Definition: Exception.cpp:391
Magick::ErrorCache::ErrorCache
ErrorCache(const std::string &what_)
Definition: Exception.cpp:101
Magick::ErrorXServer
Definition: Exception.h:226
MagickPPExport
#define MagickPPExport
Definition: Include.h:297
Magick::ErrorUndefined::~ErrorUndefined
~ErrorUndefined()
Definition: Exception.cpp:359
Magick::Warning::Warning
Warning(const std::string &what_)
Definition: Exception.cpp:377
Magick::Warning
Definition: Exception.h:238
Magick::Exception
Definition: Exception.h:24
Magick::WarningCache
Definition: Exception.h:254
Magick::WarningResourceLimit::~WarningResourceLimit
~WarningResourceLimit()
Definition: Exception.cpp:624
Magick::WarningDelegate::~WarningDelegate
~WarningDelegate()
Definition: Exception.cpp:474
Magick::ErrorOption::ErrorOption
ErrorOption(const std::string &what_)
Definition: Exception.cpp:261
Magick::ErrorStream::ErrorStream
ErrorStream(const std::string &what_)
Definition: Exception.cpp:320
Magick::WarningCorruptImage::WarningCorruptImage
WarningCorruptImage(const std::string &what_)
Definition: Exception.cpp:448
Magick::ErrorModule
Definition: Exception.h:154
Magick::WarningCorruptImage
Definition: Exception.h:278
Magick::throwExceptionExplicit
MagickPPExport void throwExceptionExplicit(const MagickCore::ExceptionType severity_, const char *reason_, const char *description_=(char *) NULL)
Definition: Exception.cpp:808
Magick::ErrorResourceLimit::~ErrorResourceLimit
~ErrorResourceLimit()
Definition: Exception.cpp:316
Magick::WarningResourceLimit
Definition: Exception.h:367
Magick::WarningCache::WarningCache
WarningCache(const std::string &what_)
Definition: Exception.cpp:405
Magick::ErrorXServer::ErrorXServer
ErrorXServer(const std::string &what_)
Definition: Exception.cpp:363
Magick::ErrorPolicy::ErrorPolicy
ErrorPolicy(const std::string &what_)
Definition: Exception.cpp:275
Magick::ErrorPolicy
Definition: Exception.h:178
Magick::ErrorBlob::ErrorBlob
ErrorBlob(const std::string &what_)
Definition: Exception.cpp:87
Magick::ErrorCorruptImage::ErrorCorruptImage
ErrorCorruptImage(const std::string &what_)
Definition: Exception.cpp:144
Magick::WarningType
Definition: Exception.h:383
Magick::ErrorDraw::~ErrorDraw
~ErrorDraw()
Definition: Exception.cpp:184
ThrowPPException
#define ThrowPPException(quiet)
Definition: Include.h:1580
Magick::ErrorBlob::~ErrorBlob
~ErrorBlob()
Definition: Exception.cpp:97
Magick::ErrorCoder
Definition: Exception.h:90
Magick::ErrorImage::~ErrorImage
~ErrorImage()
Definition: Exception.cpp:214
Include.h
Magick::WarningFileOpen::WarningFileOpen
WarningFileOpen(const std::string &what_)
Definition: Exception.cpp:492
Magick::ErrorMissingDelegate
Definition: Exception.h:146
Magick::ErrorResourceLimit::ErrorResourceLimit
ErrorResourceLimit(const std::string &what_)
Definition: Exception.cpp:305
Magick::WarningImage
Definition: Exception.h:310
Magick::ErrorCoder::ErrorCoder
ErrorCoder(const std::string &what_)
Definition: Exception.cpp:115
Magick::Warning::~Warning
~Warning()
Definition: Exception.cpp:387
Magick::Exception::~Exception
virtual ~Exception()
Definition: Exception.cpp:45
Magick::WarningDelegate
Definition: Exception.h:286
Magick::ErrorDelegate::~ErrorDelegate
~ErrorDelegate()
Definition: Exception.cpp:170
Magick::ErrorType
Definition: Exception.h:210
Magick::ErrorMonitor::~ErrorMonitor
~ErrorMonitor()
Definition: Exception.cpp:257
Magick::WarningMissingDelegate::~WarningMissingDelegate
~WarningMissingDelegate()
Definition: Exception.cpp:533
Magick::Error::~Error
~Error()
Definition: Exception.cpp:83
Magick::ErrorType::ErrorType
ErrorType(const std::string &what_)
Definition: Exception.cpp:334
Magick::ErrorModule::~ErrorModule
~ErrorModule()
Definition: Exception.cpp:243
Magick::ErrorCoder::~ErrorCoder
~ErrorCoder()
Definition: Exception.cpp:125
Magick::WarningImage::WarningImage
WarningImage(const std::string &what_)
Definition: Exception.cpp:507
Magick::ErrorConfigure::~ErrorConfigure
~ErrorConfigure()
Definition: Exception.cpp:140
Magick::ErrorModule::ErrorModule
ErrorModule(const std::string &what_)
Definition: Exception.cpp:233
Magick::WarningBlob::~WarningBlob
~WarningBlob()
Definition: Exception.cpp:401
Magick::WarningXServer::~WarningXServer
~WarningXServer()
Definition: Exception.cpp:683
Magick::ErrorDraw::ErrorDraw
ErrorDraw(const std::string &what_)
Definition: Exception.cpp:174
Magick::WarningConfigure
Definition: Exception.h:270
Magick::Exception::operator=
Exception & operator=(const Exception &original_)
Definition: Exception.cpp:50
Magick::WarningModule
Definition: Exception.h:327
Magick::WarningStream::~WarningStream
~WarningStream()
Definition: Exception.cpp:639
Magick::ErrorStream
Definition: Exception.h:202
Magick::WarningRegistry::~WarningRegistry
~WarningRegistry()
Definition: Exception.cpp:594
GetPPException
#define GetPPException
Definition: Include.h:1561
Magick::ErrorUndefined
Definition: Exception.h:218
Magick::WarningType::~WarningType
~WarningType()
Definition: Exception.cpp:653
Exception.h
Magick::ErrorMonitor::ErrorMonitor
ErrorMonitor(const std::string &what_)
Definition: Exception.cpp:247
Magick::WarningMonitor::~WarningMonitor
~WarningMonitor()
Definition: Exception.cpp:564
Magick::ErrorStream::~ErrorStream
~ErrorStream()
Definition: Exception.cpp:330
Magick::createException
Exception * createException(const MagickCore::ExceptionInfo *exception_)
Definition: Exception.cpp:702
Magick::ErrorCache
Definition: Exception.h:82
Magick::Exception::Exception
Exception(const std::string &what_)
Definition: Exception.cpp:23
Magick::ErrorMissingDelegate::ErrorMissingDelegate
ErrorMissingDelegate(const std::string &what_)
Definition: Exception.cpp:218
Magick::WarningType::WarningType
WarningType(const std::string &what_)
Definition: Exception.cpp:643
Magick::ErrorConfigure::ErrorConfigure
ErrorConfigure(const std::string &what_)
Definition: Exception.cpp:129
Magick::WarningConfigure::~WarningConfigure
~WarningConfigure()
Definition: Exception.cpp:444
Magick::ErrorCorruptImage::~ErrorCorruptImage
~ErrorCorruptImage()
Definition: Exception.cpp:155
Magick::WarningDraw
Definition: Exception.h:294
Magick::WarningImage::~WarningImage
~WarningImage()
Definition: Exception.cpp:517
Magick::WarningStream
Definition: Exception.h:375
Magick::WarningCoder::~WarningCoder
~WarningCoder()
Definition: Exception.cpp:429