#include <j2k/Fred/Error/JErrorHandler.hpp>
Go to the source code of this file.
Functions | |
void | defaultErrorHandler (JErrorLevel level, JErrorNo no, const char *errmsg, int line, const char *file) |
void | cheapError (int line, const char *file, const char *errmsg) |
|
Definition at line 53 of file JErrorHandler.cpp. 00053 { 00054 00055 char buf[600]; 00056 memset( buf, 0, 600 ); 00057 00058 sprintf( buf, 00059 "\n\n***********************************************\n" 00060 "An error has occured" 00061 "at line %d of file %s,\n\n" 00062 "Here's a brief description of the error:\n" 00063 "\n%s\n" 00064 "\n\n***********************************************\n\n", 00065 line, file, errmsg 00066 ); 00067 } |
|
Definition at line 20 of file JErrorHandler.cpp. 00021 { 00022 register size_t l = (size_t)level; 00023 register size_t n = (size_t)no; 00024 00025 char* errmsgtbl = ""; 00026 char* levmsg = ""; 00027 00028 if ( n < __J2K__MAX_ERROR ) { 00029 errmsgtbl = (char*)JErrorMsg[ n ]; 00030 } 00031 00032 if ( l < 6 ) { 00033 levmsg = (char*)JErrorLevelMsg[ l ]; 00034 } 00035 00036 char buf[600]; 00037 memset( buf, 0, 600 ); 00038 00039 sprintf( buf, 00040 "\n\n***********************************************\n" 00041 "An error of type #%d of level %d/5 has occured\n" 00042 "at line %d of file %s,\n\n" 00043 "Here's a brief description of the error:\n" 00044 "%s \n[%s]\n%s" 00045 "\n\n***********************************************\n\n", 00046 n, l, line, file, levmsg, errmsgtbl, errmsg 00047 ); 00048 00049 // Abort if critical. 00050 // assert( n <= __J2K__NON_FATAL_ERROR && l <= __J2K__MaxErrorLevel ); 00051 } |