MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / filterException

Function filterException

cli/sehwrapper.cpp:179–259  ·  view source on GitHub ↗

* Any evaluation of the exception needs to be done here! */

Source from the content-addressed store, hash-verified

177 * Any evaluation of the exception needs to be done here!
178 */
179 int filterException(FILE *outputFile, int code, PEXCEPTION_POINTERS ex)
180 {
181 fputs("Internal error: ", outputFile);
182 switch (ex->ExceptionRecord->ExceptionCode) {
183 case EXCEPTION_ACCESS_VIOLATION:
184 writeMemoryErrorDetails(outputFile, ex, "Access violation");
185 break;
186 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
187 fputs("Out of array bounds", outputFile);
188 break;
189 case EXCEPTION_BREAKPOINT:
190 fputs("Breakpoint", outputFile);
191 break;
192 case EXCEPTION_DATATYPE_MISALIGNMENT:
193 fputs("Misaligned data", outputFile);
194 break;
195 case EXCEPTION_FLT_DENORMAL_OPERAND:
196 fputs("Denormalized floating-point value", outputFile);
197 break;
198 case EXCEPTION_FLT_DIVIDE_BY_ZERO:
199 fputs("Floating-point divide-by-zero", outputFile);
200 break;
201 case EXCEPTION_FLT_INEXACT_RESULT:
202 fputs("Inexact floating-point value", outputFile);
203 break;
204 case EXCEPTION_FLT_INVALID_OPERATION:
205 fputs("Invalid floating-point operation", outputFile);
206 break;
207 case EXCEPTION_FLT_OVERFLOW:
208 fputs("Floating-point overflow", outputFile);
209 break;
210 case EXCEPTION_FLT_STACK_CHECK:
211 fputs("Floating-point stack overflow", outputFile);
212 break;
213 case EXCEPTION_FLT_UNDERFLOW:
214 fputs("Floating-point underflow", outputFile);
215 break;
216 case EXCEPTION_GUARD_PAGE:
217 fputs("Page-guard access", outputFile);
218 break;
219 case EXCEPTION_ILLEGAL_INSTRUCTION:
220 fputs("Illegal instruction", outputFile);
221 break;
222 case EXCEPTION_IN_PAGE_ERROR:
223 writeMemoryErrorDetails(outputFile, ex, "Invalid page access");
224 break;
225 case EXCEPTION_INT_DIVIDE_BY_ZERO:
226 fputs("Integer divide-by-zero", outputFile);
227 break;
228 case EXCEPTION_INT_OVERFLOW:
229 fputs("Integer overflow", outputFile);
230 break;
231 case EXCEPTION_INVALID_DISPOSITION:
232 fputs("Invalid exception dispatcher", outputFile);
233 break;
234 case EXCEPTION_INVALID_HANDLE:
235 fputs("Invalid handle", outputFile);
236 break;

Callers 1

filter_seh_execeptionFunction · 0.85

Calls 2

writeMemoryErrorDetailsFunction · 0.85
printCallstackFunction · 0.85

Tested by

no test coverage detected