Arcane
v3.14.10.0
Documentation utilisateur
Chargement...
Recherche...
Aucune correspondance
ValueChecker.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
/* ValueChecker.cc (C) 2000-2016 */
9
/* */
10
/* Fonctions pour convertir un type en un autre. */
11
/*---------------------------------------------------------------------------*/
12
/*---------------------------------------------------------------------------*/
13
14
#include "arcane/utils/ArcanePrecomp.h"
15
16
#include "arcane/utils/FatalErrorException.h"
17
#include "arcane/utils/ValueChecker.h"
18
19
/*---------------------------------------------------------------------------*/
20
/*---------------------------------------------------------------------------*/
21
22
ARCANE_BEGIN_NAMESPACE
23
24
/*---------------------------------------------------------------------------*/
25
/*---------------------------------------------------------------------------*/
26
27
void
ValueChecker::
28
_addError(
const
String& message)
29
{
30
++m_nb_error;
31
if
(m_throw_on_error){
32
throw
FatalErrorException(m_trace_info,message);
33
}
34
else
{
35
m_last_error_str = message;
36
m_ostr() << message <<
'\n'
;
37
}
38
}
39
40
/*---------------------------------------------------------------------------*/
41
/*---------------------------------------------------------------------------*/
42
43
void
ValueChecker::
44
throwIfError()
45
{
46
if
(m_nb_error!=0){
47
m_nb_error = 0;
48
throw
FatalErrorException
(m_trace_info,m_ostr.str());
49
}
50
}
51
52
/*---------------------------------------------------------------------------*/
53
/*---------------------------------------------------------------------------*/
54
55
ARCANE_END_NAMESPACE
56
57
/*---------------------------------------------------------------------------*/
58
/*---------------------------------------------------------------------------*/
59
Arccore::FatalErrorException
Exception lorsqu'une erreur fatale est survenue.
Definition
arccore/src/base/arccore/base/FatalErrorException.h:32
arcane
utils
ValueChecker.cc
Généré le Lundi 18 Novembre 2024 02:56:56 pour Arcane par
1.9.8