14#include "arcane/utils/ArcanePrecomp.h"
16#include "arcane/utils/Iostream.h"
17#include "arcane/utils/SignalException.h"
28SignalException(
const String& where,eSignalType st,
int signal_number)
29: Exception(
"Signal",where)
31, m_signal_number(signal_number)
39SignalException(
const String& where,
const StackTrace& stack_trace,
40 eSignalType st,
int signal_number)
41: Exception(
"Signal",where,stack_trace)
43, m_signal_number(signal_number)
51SignalException(
const SignalException& ex)
53, m_message(ex.m_message)
54, m_signal_type(ex.m_signal_type)
55, m_signal_number(ex.m_signal_number)
63explain(std::ostream& m)
const
65 if (!m_message.null())
66 m <<
"Message: " << m_message <<
'\n';
68 m <<
"A fatal signal has occurred: ";
69 switch(m_signal_type){
70 case ST_FloatingException:
71 m <<
"Floating Exception";
73 case ST_SegmentationFault:
74 m <<
"Segmentation Violation";
86 m <<
" (signal number is: " << m_signal_number <<
")\n";
92SignalException::eSignalType SignalException::
104 return m_signal_number;