- dstream<<"In trans_func.\n";
- if(u == EXCEPTION_ACCESS_VIOLATION)
- {
- PEXCEPTION_RECORD r = pExp->ExceptionRecord;
- dstream<<"Access violation at "<<r->ExceptionAddress
- <<" write?="<<r->ExceptionInformation[0]
- <<" address="<<r->ExceptionInformation[1]
- <<std::endl;
- throw FatalSystemException
- ("Access violation");
- }
- if(u == EXCEPTION_STACK_OVERFLOW)
- {
- throw FatalSystemException
- ("Stack overflow");
- }
- if(u == EXCEPTION_ILLEGAL_INSTRUCTION)
- {
- throw FatalSystemException
- ("Illegal instruction");
+ switch (exception_code) {
+ case EXCEPTION_ACCESS_VIOLATION:
+ return "Access violation";
+ case EXCEPTION_DATATYPE_MISALIGNMENT:
+ return "Misaligned data access";
+ case EXCEPTION_BREAKPOINT:
+ return "Breakpoint reached";
+ case EXCEPTION_SINGLE_STEP:
+ return "Single debug step";
+ case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
+ return "Array access out of bounds";
+ case EXCEPTION_FLT_DENORMAL_OPERAND:
+ return "Denormal floating point operand";
+ case EXCEPTION_FLT_DIVIDE_BY_ZERO:
+ return "Floating point division by zero";
+ case EXCEPTION_FLT_INEXACT_RESULT:
+ return "Inaccurate floating point result";
+ case EXCEPTION_FLT_INVALID_OPERATION:
+ return "Invalid floating point operation";
+ case EXCEPTION_FLT_OVERFLOW:
+ return "Floating point exponent overflow";
+ case EXCEPTION_FLT_STACK_CHECK:
+ return "Floating point stack overflow or underflow";
+ case EXCEPTION_FLT_UNDERFLOW:
+ return "Floating point exponent underflow";
+ case EXCEPTION_INT_DIVIDE_BY_ZERO:
+ return "Integer division by zero";
+ case EXCEPTION_INT_OVERFLOW:
+ return "Integer overflow";
+ case EXCEPTION_PRIV_INSTRUCTION:
+ return "Privileged instruction executed";
+ case EXCEPTION_IN_PAGE_ERROR:
+ return "Could not access or load page";
+ case EXCEPTION_ILLEGAL_INSTRUCTION:
+ return "Illegal instruction encountered";
+ case EXCEPTION_NONCONTINUABLE_EXCEPTION:
+ return "Attempted to continue after fatal exception";
+ case EXCEPTION_STACK_OVERFLOW:
+ return "Stack overflow";
+ case EXCEPTION_INVALID_DISPOSITION:
+ return "Invalid disposition returned to the exception dispatcher";
+ case EXCEPTION_GUARD_PAGE:
+ return "Attempted guard page access";
+ case EXCEPTION_INVALID_HANDLE:
+ return "Invalid handle";