Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
BadOperationException.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/* BadOperationException.cc (C) 2000-2016 */
9/* */
10/* Exception sur une opération des expressions. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arcane/utils/ArcanePrecomp.h"
15
16#include "arcane/utils/Iostream.h"
17
18#include "arcane/expr/BadOperationException.h"
19
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23ARCANE_BEGIN_NAMESPACE
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28BadOperationException::
29BadOperationException(const String& where,const String& operation_name,
30 VariantBase::eType operand_type)
31: Exception("BadOperation",where)
32, m_operation_name(operation_name)
33, m_operand_type(operand_type)
34{
35}
36
37/*---------------------------------------------------------------------------*/
38/*---------------------------------------------------------------------------*/
39
40BadOperationException::
41BadOperationException(const BadOperationException& ex)
42: Exception(ex)
43, m_operation_name(ex.m_operation_name)
44, m_operand_type(ex.m_operand_type)
45{
46}
47
48/*---------------------------------------------------------------------------*/
49/*---------------------------------------------------------------------------*/
50
51void BadOperationException::
52explain(std::ostream& m) const
53{
54 m << "Operation " << m_operation_name
55 << " non définie pour le type "
56 << VariantBase::typeName(m_operand_type)
57 << '\n';
58}
59
60/*---------------------------------------------------------------------------*/
61/*---------------------------------------------------------------------------*/
62
63ARCANE_END_NAMESPACE
64
65/*---------------------------------------------------------------------------*/
66/*---------------------------------------------------------------------------*/
67
68