Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
BadOperationException.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/* BadOperationException.cc (C) 2000-2016 */
9/* */
10/* Exception on an expression operation. */
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
23namespace Arcane
24{
25
26/*---------------------------------------------------------------------------*/
27/*---------------------------------------------------------------------------*/
28
29BadOperationException::
30BadOperationException(const String& where, const String& operation_name,
31 VariantBase::eType operand_type)
32: Exception("BadOperation", where)
33, m_operation_name(operation_name)
34, m_operand_type(operand_type)
35{
36}
37
38/*---------------------------------------------------------------------------*/
39/*---------------------------------------------------------------------------*/
40
41BadOperationException::
42BadOperationException(const BadOperationException& ex)
43: Exception(ex)
44, m_operation_name(ex.m_operation_name)
45, m_operand_type(ex.m_operand_type)
46{
47}
48
49/*---------------------------------------------------------------------------*/
50/*---------------------------------------------------------------------------*/
51
52void BadOperationException::
53explain(std::ostream& m) const
54{
55 m << "Operation " << m_operation_name
56 << " non définie pour le type "
57 << VariantBase::typeName(m_operand_type)
58 << '\n';
59}
60
61/*---------------------------------------------------------------------------*/
62/*---------------------------------------------------------------------------*/
63
64} // namespace Arcane
65
66/*---------------------------------------------------------------------------*/
67/*---------------------------------------------------------------------------*/
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --