Arcane  v3.14.10.0
Documentation utilisateur
Chargement...
Recherche...
Aucune correspondance
SignalException.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2022 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 lorsqu'un signal survient. */
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
22ARCANE_BEGIN_NAMESPACE
23
24/*---------------------------------------------------------------------------*/
25/*---------------------------------------------------------------------------*/
26/*!
27 * \internal
28 * \brief Exception lorsqu'un signal survient.
29 */
30class ARCANE_UTILS_EXPORT SignalException
31: public Exception
32{
33 public:
34 enum eSignalType
35 {
36 ST_Unknown,
37 ST_FloatingException,
38 ST_SegmentationFault,
39 ST_BusError,
40 ST_Alarm
41 };
42 public:
43
44 SignalException(const String& where,eSignalType st,int signal_number);
45 SignalException(const String& where,const StackTrace& stack_trace,
46 eSignalType st,int signal_number);
48 ~SignalException() ARCANE_NOEXCEPT {}
49
50 public:
51
52 virtual void explain(std::ostream& m) const;
53 eSignalType signalType() const;
54 int signalNumber() const;
55
56 private:
57
58 String m_message;
59 eSignalType m_signal_type;
60 int m_signal_number;
61};
62
63/*---------------------------------------------------------------------------*/
64/*---------------------------------------------------------------------------*/
65
66/*---------------------------------------------------------------------------*/
67/*---------------------------------------------------------------------------*/
68
69ARCANE_END_NAMESPACE
70
71/*---------------------------------------------------------------------------*/
72/*---------------------------------------------------------------------------*/
73
74#endif
75
Classe de base d'une exception.
virtual void explain(std::ostream &o) const
Explique la cause de l'exception dans le flot o.
Chaîne de caractères unicode.