Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
BadExpressionException.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/* BadExpressionException.h (C) 2000-2018 */
9/* */
10/* Exception when an expression is not valid. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_EXPR_BADEXPRESSIONEXCEPTION_H
13#define ARCANE_EXPR_BADEXPRESSIONEXCEPTION_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/Exception.h"
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
31class BadExpressionException
32: public Exception
33{
34 public:
35
36 BadExpressionException(const String& where);
37 BadExpressionException(const String& where, const String& msg);
38 ~BadExpressionException() ARCANE_NOEXCEPT override {}
39
40 public:
41
42 void explain(std::ostream& m) const override;
43
44 private:
45
46 String m_msg;
47};
48
49/*---------------------------------------------------------------------------*/
50/*---------------------------------------------------------------------------*/
51
52} // namespace Arcane
53
54/*---------------------------------------------------------------------------*/
55/*---------------------------------------------------------------------------*/
56
57#endif
void explain(std::ostream &m) const override
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 --