Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
SignalException.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* SignalException.h (C) 2000-2018 */
9/* */
10/* Exception when a signal occurs. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_UTILS_SIGNALEXCEPTION_H
13#define ARCANE_UTILS_SIGNALEXCEPTION_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/Exception.h"
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
32class ARCANE_UTILS_EXPORT SignalException
33: public Exception
34{
35 public:
36
37 enum eSignalType
38 {
39 ST_Unknown,
40 ST_FloatingException,
41 ST_SegmentationFault,
42 ST_BusError,
43 ST_Alarm
44 };
45
46 public:
47
48 SignalException(const String& where, eSignalType st, int signal_number);
49 SignalException(const String& where, const StackTrace& stack_trace,
50 eSignalType st, int signal_number);
51 SignalException(const SignalException& ex);
52 ~SignalException() ARCANE_NOEXCEPT {}
53
54 public:
55
56 virtual void explain(std::ostream& m) const;
57 eSignalType signalType() const;
58 int signalNumber() const;
59
60 private:
61
62 String m_message;
63 eSignalType m_signal_type;
64 int m_signal_number;
65};
66
67/*---------------------------------------------------------------------------*/
68/*---------------------------------------------------------------------------*/
69
70/*---------------------------------------------------------------------------*/
71/*---------------------------------------------------------------------------*/
72
73} // namespace Arcane
74
75/*---------------------------------------------------------------------------*/
76/*---------------------------------------------------------------------------*/
77
78#endif
const String & where() const
Location of the exception.
Exception(const String &name, const String &where)
virtual void explain(std::ostream &m) const
Explains the cause of the exception in the stream o.
Information about function call stacks.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --