Changeset 577
- Timestamp:
- Jul 3, 2006 1:09:20 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/src/pj/except.c
r331 r577 22 22 #include <pj/log.h> 23 23 #include <pj/errno.h> 24 #include <pj/string.h> 24 25 25 26 static long thread_local_id = -1; … … 43 44 handler = pj_thread_local_get(thread_local_id); 44 45 if (handler == NULL) { 45 PJ_LOG(1,("except.c", "!!!FATAL: unhandled exception %d!\n", exception_id)); 46 PJ_LOG(1,("except.c", "!!!FATAL: unhandled exception %s!\n", 47 pj_exception_id_name(exception_id))); 46 48 pj_assert(handler != NULL); 47 49 /* This will crash the system! */ … … 116 118 PJ_DEF(const char*) pj_exception_id_name(pj_exception_id_t id) 117 119 { 120 static char unknown_name[32]; 121 118 122 /* 119 123 * Start from 1 (not 0)!!! … … 122 126 PJ_ASSERT_RETURN(id>0 && id<PJ_MAX_EXCEPTION_ID, "<Invalid ID>"); 123 127 124 if (exception_id_names[id] == NULL) 125 return "<Unallocated ID>"; 128 if (exception_id_names[id] == NULL) { 129 pj_ansi_sprintf(unknown_name, "exception %d", id); 130 return unknown_name; 131 } 126 132 127 133 return exception_id_names[id];
Note: See TracChangeset
for help on using the changeset viewer.