MagickCore 7.0.10
exception-private.h File Reference
#include "wizard/log.h"
#include "wizard/string_.h"
#include "wizard/wizard.h"
Include dependency graph for exception-private.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CatchWizardException(severity, tag, context)
 
#define WizardAssert(domain, predicate)
 
#define ThrowFileException(exception, severity, context)
 
#define ThrowWizardFatalError(domain, error)
 
#define ThrowFatalException(severity, tag)
 

Macro Definition Documentation

◆ CatchWizardException

#define CatchWizardException (   severity,
  tag,
  context 
)
Value:
{ \
*exception; \
\
exception=AcquireExceptionInfo(); \
(void) ThrowWizardException(exception,GetWizardModule(),severity,tag,context); \
CatchException(exception); \
exception=DestroyExceptionInfo(exception); \
}
WizardExport ExceptionInfo * AcquireExceptionInfo(void)
Definition exception.c:125
WizardExport ExceptionInfo * DestroyExceptionInfo(ExceptionInfo *exception)
Definition exception.c:399
WizardExport WizardBooleanType ThrowWizardException(ExceptionInfo *exception, const char *module, const char *function, const size_t line, const ExceptionType severity, const char *format,...)
Definition exception.c:1029
#define GetWizardModule()
Definition log.h:30

Definition at line 29 of file exception-private.h.

◆ ThrowFatalException

#define ThrowFatalException (   severity,
  tag 
)
Value:
{ \
char \
*message; \
\
message=GetExceptionMessage(errno); \
CatchWizardException(severity,tag,message); \
message=DestroyString(message); \
WizardsToolkitTerminus(); \
_exit(127); \
}
WizardExport char * GetExceptionMessage(const int error)
Definition exception.c:471
WizardExport char * DestroyString(char *string)
Definition string.c:830

Definition at line 77 of file exception-private.h.

◆ ThrowFileException

#define ThrowFileException (   exception,
  severity,
  context 
)
Value:
{ \
char \
*message; \
\
message=GetExceptionMessage(errno); \
(void) ThrowWizardException(exception,GetWizardModule(),severity, \
"file exception `%s': %s",context,message); \
message=DestroyString(message); \
}

Definition at line 53 of file exception-private.h.

◆ ThrowWizardFatalError

#define ThrowWizardFatalError (   domain,
  error 
)
Value:
{ \
char \
context[WizardPathExtent], \
\
(void) FormatLocaleString(tag,WizardPathExtent,"%ld\n",(long) domain); \
(void) FormatLocaleString(context,WizardPathExtent,"%ld\n",(long) error); \
CatchWizardException(UndefinedException,tag,context); \
WizardsToolkitTerminus(); \
_exit((domain << 3) | error); \
}
@ UndefinedException
Definition exception.h:61
WizardExport ssize_t FormatLocaleString(char *string, const size_t length, const char *format,...)
Definition locale.c:465
#define WizardPathExtent

Definition at line 64 of file exception-private.h.

◆ WizardAssert

#define WizardAssert (   domain,
  predicate 
)
Value:
{ \
if ((WizardBooleanType) (predicate) == WizardFalse) \
ThrowWizardFatalError(domain,AssertError); \
}
@ AssertError
Definition exception.h:56
WizardBooleanType
Definition wizard-type.h:26
@ WizardFalse
Definition wizard-type.h:27

Definition at line 46 of file exception-private.h.