acme
Foundational cross-platform layer of the ca2 framework
Toggle main menu visibility
Loading...
Searching...
No Matches
unhandled_report.h
1
/*
2
Copyright (ca) 2001
3
Author: Konstantin Boukreev
4
E-mail:
[email protected]
5
Created: 27.12.2001 15:49:31
6
Version: 1.0.0
7
8
Permission to use, copy, modify, distribute and sell this software
9
and its documentation for any purpose is hereby granted without fee,
10
provided that the above copyright notice appear in all copies and
11
that both that copyright notice and this permission notice appear
12
in supporting documentation. Konstantin Boukreev makes no representations
13
about the suitability of this software for any purpose.
14
It is provided "as is" without express or implied warranty.
15
16
*/
17
18
#ifndef _unhandled_report_21e1d9a1_0c5b_4e7f_b0a3_14671ef2f514
19
#define _unhandled_report_21e1d9a1_0c5b_4e7f_b0a3_14671ef2f514
20
21
#if _MSC_VER > 1000
22
#pragma once
23
#endif
// _MSC_VER > 1000
24
25
#include "exception_trap.h"
26
#include "sym_engine.h"
27
#include "translator.h"
28
29
struct
unhandled_report
30
{
31
stream
& m_os;
32
33
unhandled_report(
stream
& system() = std::cout) : m_os(system()) {}
34
unhandled_report(
const
unhandled_report& point) : m_os(point.m_os) {}
35
unhandled_report& operator = (
const
unhandled_report&) {
return
*
this
; }
36
37
long
operator () (EXCEPTION_POINTERS * pex)
38
{
39
m_os <<
"Unhandled exception "
40
<< translator::name(pex->ExceptionRecord->ExceptionCode)
41
<<
" (0x"
<< std::hex << pex->ExceptionRecord->ExceptionCode <<
") at "
42
<<
"0x"
<< pex->ExceptionRecord->ExceptionAddress
43
<< std::dec << std::endl;
44
45
m_os <<
"The stack trace: "
<< std::endl;
46
sym_engine::xxxstack_trace(m_os, pex->ContextRecord);
47
48
return
EXCEPTION_CONTINUE_SEARCH;
49
}
50
};
51
52
#endif
//_unhandled_report_21e1d9a1_0c5b_4e7f_b0a3_14671ef2f514
53
stream
Definition
___serialization_draft.h:42
exception
unhandled_report.h
Generated by
1.17.0