Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
GoBackwardException.cc
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/* GoBackwardException.cc (C) 2000-2015 */
9/* */
10/* Exception to request a backward step in the time loop */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arcane/utils/ArcanePrecomp.h"
15
16#include "arcane/utils/String.h"
17#include "arcane/utils/Iostream.h"
18#include "arcane/utils/GoBackwardException.h"
19
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23namespace Arcane
24{
25
26/*---------------------------------------------------------------------------*/
27/*---------------------------------------------------------------------------*/
28
29GoBackwardException::
30GoBackwardException(const String& where)
31: Exception("GoBackward", where)
32{
33}
34
35/*---------------------------------------------------------------------------*/
36/*---------------------------------------------------------------------------*/
37
38GoBackwardException::
39GoBackwardException(const String& where, const String& message)
40: Exception("GoBackward", where)
41, m_message(message)
42{
43}
44
45/*---------------------------------------------------------------------------*/
46/*---------------------------------------------------------------------------*/
47
48GoBackwardException::
49GoBackwardException(const TraceInfo& where)
50: Exception("GoBackward", where)
51{
52}
53
54/*---------------------------------------------------------------------------*/
55/*---------------------------------------------------------------------------*/
56
57GoBackwardException::
58GoBackwardException(const TraceInfo& where, const String& message)
59: Exception("GoBackward", where)
60, m_message(message)
61{
62}
63
64/*---------------------------------------------------------------------------*/
65/*---------------------------------------------------------------------------*/
66
67void GoBackwardException::
68explain(std::ostream& m) const
69{
70 m << "Go backward.";
71 if (!m_message.null())
72 m << "Message: " << m_message << '\n';
73}
74
75/*---------------------------------------------------------------------------*/
76/*---------------------------------------------------------------------------*/
77
78} // namespace Arcane
79
80/*---------------------------------------------------------------------------*/
81/*---------------------------------------------------------------------------*/
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --