Arcane  v3.14.10.0
Documentation utilisateur
Chargement...
Recherche...
Aucune correspondance
IOException.cc
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/* IOException.cc (C) 2000-2018 */
9/* */
10/* Exception lorsqu'une erreur d'entrée/sortie est détectée. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arcane/utils/ArcanePrecomp.h"
15
16#include "arcane/utils/Iostream.h"
17#include "arcane/utils/IOException.h"
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22ARCANE_BEGIN_NAMESPACE
23
24/*---------------------------------------------------------------------------*/
25/*---------------------------------------------------------------------------*/
26
27IOException::
28IOException(const String& where)
29: Exception("IOException",where)
30{
31}
32
33/*---------------------------------------------------------------------------*/
34/*---------------------------------------------------------------------------*/
35
36IOException::
37IOException(const String& where,const String& message)
38: Exception("IOException",where)
39, m_message(message)
40{
41}
42
43/*---------------------------------------------------------------------------*/
44/*---------------------------------------------------------------------------*/
45
46IOException::
47IOException(const TraceInfo& where)
48: Exception("IOException",where)
49{
50}
51
52/*---------------------------------------------------------------------------*/
53/*---------------------------------------------------------------------------*/
54
55IOException::
56IOException(const TraceInfo& where,const String& message)
57: Exception("IOException",where)
58, m_message(message)
59{
60}
61
62/*---------------------------------------------------------------------------*/
63/*---------------------------------------------------------------------------*/
64
65IOException::
66IOException(const IOException& ex)
67: Exception(ex)
68, m_message(ex.m_message)
69{
70}
71
72/*---------------------------------------------------------------------------*/
73/*---------------------------------------------------------------------------*/
74
75void IOException::
76explain(std::ostream& m) const
77{
78 if (!m_message.null())
79 m << "Message: " << m_message << '\n';
80}
81
82/*---------------------------------------------------------------------------*/
83/*---------------------------------------------------------------------------*/
84
85ARCANE_END_NAMESPACE
86
87/*---------------------------------------------------------------------------*/
88/*---------------------------------------------------------------------------*/
89