Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
BadExpressionException.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/* BadExpressionException.cc (C) 2000-2018 */
9/* */
10/* Exception lorsqu'une expression n'est pas valide. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14
15#include "arcane/utils/ArcanePrecomp.h"
16
17#include "arcane/utils/Iostream.h"
18
19#include "arcane/expr/BadExpressionException.h"
20
21/*---------------------------------------------------------------------------*/
22/*---------------------------------------------------------------------------*/
23
24ARCANE_BEGIN_NAMESPACE
25
26/*---------------------------------------------------------------------------*/
27/*---------------------------------------------------------------------------*/
28
29BadExpressionException::
30BadExpressionException(const String& where)
31: Exception("BadExpression",where)
32, m_msg("")
33{
34}
35
36/*---------------------------------------------------------------------------*/
37/*---------------------------------------------------------------------------*/
38
39BadExpressionException::
40BadExpressionException(const String& where,const String& msg)
41: Exception("BadExpression",where)
42, m_msg(msg)
43{
44}
45
46/*---------------------------------------------------------------------------*/
47/*---------------------------------------------------------------------------*/
48
49void BadExpressionException::
50explain(std::ostream& m) const
51{
52 if (m_msg.empty())
53 m << "Expression invalide.\n";
54 else
55 m << m_msg << '\n';
56}
57
58/*---------------------------------------------------------------------------*/
59/*---------------------------------------------------------------------------*/
60
61/*---------------------------------------------------------------------------*/
62/*---------------------------------------------------------------------------*/
63
64ARCANE_END_NAMESPACE
65
66/*---------------------------------------------------------------------------*/
67/*---------------------------------------------------------------------------*/
68
69