|
MagickCore 7.0.10
|
#include "wizard/studio.h"#include "wizard/client.h"#include "wizard/exception.h"#include "wizard/exception-private.h"#include "wizard/hashmap.h"#include "wizard/log.h"#include "wizard/memory_.h"#include "wizard/string_.h"#include "wizard/utility.h"#include "wizard/wizard.h"Go to the source code of this file.
Data Structures | |
| struct | _ExceptionInfo |
Functions | |
| static void | DefaultErrorHandler (const ExceptionType, const char *, const char *) |
| static void | DefaultFatalErrorHandler (const ExceptionType, const char *, const char *) |
| static void | DefaultWarningHandler (const ExceptionType, const char *, const char *) |
| WizardExport ExceptionInfo * | AcquireExceptionInfo (void) |
| static void * | DestroyExceptionElement (void *exception) |
| WizardExport void | ClearWizardException (ExceptionInfo *exception) |
| WizardExport void | CatchException (ExceptionInfo *exception) |
| static void | DefaultErrorHandler (const ExceptionType wizard_unused(severity), const char *reason, const char *description) |
| static void | DefaultWarningHandler (const ExceptionType wizard_unused(severity), const char *reason, const char *description) |
| WizardExport ExceptionInfo * | DestroyExceptionInfo (ExceptionInfo *exception) |
| WizardExport void | GetExceptionInfo (ExceptionInfo *exception) |
| WizardExport char * | GetExceptionMessage (const int error) |
| static const char * | ExceptionSeverityToTag (const ExceptionType severity) |
| WizardExport const char * | GetLocaleExceptionMessage (const ExceptionType severity, const char *tag) |
| WizardExport ExceptionType | GetExceptionSeverity (const ExceptionInfo *exception) |
| WizardExport void | InheritException (ExceptionInfo *exception, const ExceptionInfo *relative) |
| WizardExport void | WizardError (const ExceptionType error, const char *reason, const char *description) |
| WizardExport void | WizardFatalError (const ExceptionType error, const char *reason, const char *description) |
| WizardExport void | WizardWarning (const ExceptionType warning, const char *reason, const char *description) |
| WizardExport ErrorHandler | SetErrorHandler (ErrorHandler handler) |
| WizardExport FatalErrorHandler | SetFatalErrorHandler (FatalErrorHandler handler) |
| WizardExport WarningHandler | SetWarningHandler (WarningHandler handler) |
| WizardExport WizardBooleanType | ThrowException (ExceptionInfo *exception, const ExceptionType severity, const char *reason, const char *description) |
| WizardExport WizardBooleanType | ThrowWizardExceptionList (ExceptionInfo *exception, const char *module, const char *function, const size_t line, const ExceptionType severity, const char *format, va_list operands) |
| WizardExport WizardBooleanType | ThrowWizardException (ExceptionInfo *exception, const char *module, const char *function, const size_t line, const ExceptionType severity, const char *format,...) |
Variables | |
| static ErrorHandler | error_handler = DefaultErrorHandler |
| static FatalErrorHandler | fatal_error_handler = DefaultFatalErrorHandler |
| static WarningHandler | warning_handler = DefaultWarningHandler |
| WizardExport ExceptionInfo * AcquireExceptionInfo | ( | void | ) |
Definition at line 125 of file exception.c.
References AcquireWizardMemory(), GetExceptionInfo(), _ExceptionInfo::relinquish, ResourceFatalError, _ExceptionInfo::signature, ThrowFatalException, WizardSignature, and WizardTrue.
Referenced by AcquireRandomInfo(), CloseWizardLog(), GenerateSecretKey(), GetLocaleMessage(), IsEventLogging(), LogComponentGenesis(), LogWizardEventList(), SetLogEventMask(), SetLogFormat(), TranslateEvent(), and WizardToMime().
| WizardExport void CatchException | ( | ExceptionInfo * | exception | ) |
Definition at line 226 of file exception.c.
References ClearWizardException(), _ExceptionInfo::description, ErrorException, _ExceptionInfo::exceptions, FatalErrorException, GetNextValueInLinkedList(), LockSemaphoreInfo(), _ExceptionInfo::reason, ResetLinkedListIterator(), _ExceptionInfo::semaphore, _ExceptionInfo::severity, _ExceptionInfo::signature, UnlockSemaphoreInfo(), WarningException, WizardError(), WizardFatalError(), WizardSignature, and WizardWarning().
| WizardExport void ClearWizardException | ( | ExceptionInfo * | exception | ) |
Definition at line 178 of file exception.c.
References _ExceptionInfo::description, DestroyExceptionElement(), _ExceptionInfo::exceptions, LockSemaphoreInfo(), _ExceptionInfo::reason, RemoveLastElementFromLinkedList(), _ExceptionInfo::semaphore, _ExceptionInfo::severity, _ExceptionInfo::signature, UndefinedException, UnlockSemaphoreInfo(), and WizardSignature.
Referenced by CatchException().
|
static |
Definition at line 282 of file exception.c.
References GetClientName().
|
static |
| static void DefaultFatalErrorHandler | ( | const ExceptionType | severity, |
| const char * | reason, | ||
| const char * | description | ||
| ) |
Definition at line 323 of file exception.c.
References GetClientName(), and WizardsToolkitTerminus().
|
static |
Definition at line 365 of file exception.c.
References GetClientName().
| static void DefaultWarningHandler | ( | const ExceptionType | , |
| const char * | , | ||
| const char * | |||
| ) |
|
static |
Definition at line 164 of file exception.c.
References _ExceptionInfo::description, _ExceptionInfo::reason, and RelinquishWizardMemory().
Referenced by ClearWizardException(), and DestroyExceptionInfo().
| WizardExport ExceptionInfo * DestroyExceptionInfo | ( | ExceptionInfo * | exception | ) |
Definition at line 399 of file exception.c.
References DestroyExceptionElement(), DestroyLinkedList(), _ExceptionInfo::exceptions, LockSemaphoreInfo(), _ExceptionInfo::relinquish, RelinquishSemaphoreInfo(), RelinquishWizardMemory(), _ExceptionInfo::semaphore, _ExceptionInfo::severity, _ExceptionInfo::signature, UndefinedException, UnlockSemaphoreInfo(), WizardFalse, and WizardSignature.
Referenced by AcquireRandomInfo(), CloseWizardLog(), GenerateSecretKey(), GetLocaleMessage(), IsEventLogging(), LogComponentGenesis(), LogWizardEventList(), SetLogEventMask(), SetLogFormat(), TranslateEvent(), and WizardToMime().
|
static |
Definition at line 517 of file exception.c.
References AuthenticateError, AuthenticateFatalError, AuthenticateWarning, BlobError, BlobFatalError, BlobWarning, CipherError, CipherFatalError, CipherWarning, ConfigureError, ConfigureFatalError, ConfigureWarning, EntropyError, EntropyFatalError, EntropyWarning, FileError, FileFatalError, FileWarning, HashError, HashFatalError, HashmapFatalError, HashmapWarning, HashWarning, KeymapError, KeymapFatalError, KeymapWarning, KeyringError, KeyringFatalError, KeyringWarning, LogFatalError, LogWarning, MACError, MACFatalError, MACWarning, OptionError, OptionFatalError, OptionWarning, ParseError, ParseFatalError, ParseWarning, RandomError, RandomFatalError, RandomWarning, ResourceError, ResourceFatalError, ResourceWarning, SplayTreeError, SplayTreeFatalError, SplayTreeWarning, StringError, StringFatalError, StringWarning, UserError, UserFatalError, and UserWarning.
Referenced by GetLocaleExceptionMessage().
| WizardExport void GetExceptionInfo | ( | ExceptionInfo * | exception | ) |
Definition at line 438 of file exception.c.
References AcquireSemaphoreInfo(), _ExceptionInfo::exceptions, NewLinkedList(), _ExceptionInfo::semaphore, _ExceptionInfo::severity, _ExceptionInfo::signature, UndefinedException, and WizardSignature.
Referenced by AcquireExceptionInfo().
| WizardExport char * GetExceptionMessage | ( | const int | error | ) |
Definition at line 471 of file exception.c.
References ConstantString(), CopyWizardString(), and WizardPathExtent.
| WizardExport ExceptionType GetExceptionSeverity | ( | const ExceptionInfo * | exception | ) |
Definition at line 627 of file exception.c.
References _ExceptionInfo::severity, _ExceptionInfo::signature, and WizardSignature.
| WizardExport const char * GetLocaleExceptionMessage | ( | const ExceptionType | severity, |
| const char * | tag | ||
| ) |
Definition at line 581 of file exception.c.
References ExceptionSeverityToTag(), FormatLocaleString(), GetLocaleMessage(), and WizardPathExtent.
| WizardExport void InheritException | ( | ExceptionInfo * | exception, |
| const ExceptionInfo * | relative | ||
| ) |
Definition at line 659 of file exception.c.
References _ExceptionInfo::description, _ExceptionInfo::exceptions, GetNextValueInLinkedList(), LockSemaphoreInfo(), _ExceptionInfo::reason, ResetLinkedListIterator(), _ExceptionInfo::semaphore, _ExceptionInfo::severity, _ExceptionInfo::signature, ThrowException(), UnlockSemaphoreInfo(), and WizardSignature.
| WizardExport ErrorHandler SetErrorHandler | ( | ErrorHandler | handler | ) |
Definition at line 813 of file exception.c.
References error_handler.
| WizardExport FatalErrorHandler SetFatalErrorHandler | ( | FatalErrorHandler | handler | ) |
Definition at line 846 of file exception.c.
References fatal_error_handler.
Referenced by LoadLocaleCache().
| WizardExport WarningHandler SetWarningHandler | ( | WarningHandler | handler | ) |
Definition at line 879 of file exception.c.
References warning_handler.
| WizardExport WizardBooleanType ThrowException | ( | ExceptionInfo * | exception, |
| const ExceptionType | severity, | ||
| const char * | reason, | ||
| const char * | description | ||
| ) |
Definition at line 920 of file exception.c.
References AcquireWizardMemory(), AppendValueToLinkedList(), ConstantString(), _ExceptionInfo::description, _ExceptionInfo::exceptions, GetLastValueInLinkedList(), LocaleCompare(), LockSemaphoreInfo(), _ExceptionInfo::reason, ResourceFatalError, _ExceptionInfo::semaphore, _ExceptionInfo::severity, _ExceptionInfo::signature, ThrowFatalException, UnlockSemaphoreInfo(), WizardSignature, and WizardTrue.
Referenced by InheritException(), and ThrowWizardExceptionList().
| WizardExport WizardBooleanType ThrowWizardException | ( | ExceptionInfo * | exception, |
| const char * | module, | ||
| const char * | function, | ||
| const size_t | line, | ||
| const ExceptionType | severity, | ||
| const char * | format, | ||
| ... | |||
| ) |
Definition at line 1029 of file exception.c.
References ThrowWizardExceptionList().
Referenced by AcquireConfigureCache(), AcquireFileInfo(), AcquireFileLock(), AcquireLogCache(), AcquireUniqueFilename(), AcquireUniqueFileResource(), DestroyFile(), DestroyFileInfo(), ExportKeyringKey(), FileToBlob(), GenerateEntropicChaos(), GetConfigureInfo(), GetConfigureOptions(), GetEntropyFromReservoir(), GetLogInfo(), GetPassphrase(), ImportKeyringKey(), IncreaseBZIP(), IncreaseLZMA(), IncreaseZIP(), LoadConfigureCache(), LoadLocaleCache(), LoadLogCache(), LoadMimeCache(), NewXMLTree(), OpenBlob(), ParseCloseTag(), ParseInternalDoctype(), PrintKeyringProperties(), RelinquishFileLock(), RestoreBZIP(), RestoreLZMA(), RestoreZIP(), and SaveEntropyToReservoir().
| WizardExport WizardBooleanType ThrowWizardExceptionList | ( | ExceptionInfo * | exception, |
| const char * | module, | ||
| const char * | function, | ||
| const size_t | line, | ||
| const ExceptionType | severity, | ||
| const char * | format, | ||
| va_list | operands | ||
| ) |
Definition at line 997 of file exception.c.
References ErrorException, ExceptionEvent, FormatLocaleString(), LogWizardEvent(), _ExceptionInfo::severity, _ExceptionInfo::signature, ThrowException(), WarningEvent, WizardPathExtent, and WizardSignature.
Referenced by ThrowWizardException().
| WizardExport void WizardError | ( | const ExceptionType | error, |
| const char * | reason, | ||
| const char * | description | ||
| ) |
Definition at line 713 of file exception.c.
References error_handler.
Referenced by CatchException().
| WizardExport void WizardFatalError | ( | const ExceptionType | error, |
| const char * | reason, | ||
| const char * | description | ||
| ) |
Definition at line 749 of file exception.c.
References fatal_error_handler.
Referenced by CatchException().
| WizardExport void WizardWarning | ( | const ExceptionType | warning, |
| const char * | reason, | ||
| const char * | description | ||
| ) |
Definition at line 783 of file exception.c.
References warning_handler.
Referenced by CatchException().
|
static |
Definition at line 99 of file exception.c.
Referenced by SetErrorHandler(), and WizardError().
|
static |
Definition at line 102 of file exception.c.
Referenced by SetFatalErrorHandler(), and WizardFatalError().
|
static |
Definition at line 105 of file exception.c.
Referenced by SetWarningHandler(), and WizardWarning().