Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
BadOperationException.h
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.h (C) 2000-2025 */
9/* */
10/* Exception on an expression operation. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_EXPR_BADOPERATIONEXCEPTION_H
13#define ARCANE_CORE_EXPR_BADOPERATIONEXCEPTION_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/Exception.h"
18
19#include "arcane/core/datatype/VariantBase.h"
20
21/*---------------------------------------------------------------------------*/
22/*---------------------------------------------------------------------------*/
23
24namespace Arcane
25{
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
29
36class ARCANE_EXPR_EXPORT BadOperationException
37: public Exception
38{
39 public:
40
41 BadOperationException(const String& where, const String& operationName,
42 VariantBase::eType operandType);
43 BadOperationException(const BadOperationException& ex);
44 ~BadOperationException() ARCANE_NOEXCEPT {}
45
46 public:
47
48 virtual void explain(std::ostream& m) const;
49
50 private:
51
52 String m_operation_name;
53 VariantBase::eType m_operand_type;
54};
55
56/*---------------------------------------------------------------------------*/
57/*---------------------------------------------------------------------------*/
58
59} // namespace Arcane
60
61/*---------------------------------------------------------------------------*/
62/*---------------------------------------------------------------------------*/
63
64#endif
virtual void explain(std::ostream &m) const
Explains the cause of the exception in the stream o.
const String & where() const
Location of the exception.
Exception(const String &name, const String &where)
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --