Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
IndexOutOfRangeException.cc
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2023 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/* IndexOutOfRangeException.cc (C) 2000-2023 */
9/* */
10/* Exception lorsqu'un indice de tableau est invalide. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arccore/base/IndexOutOfRangeException.h"
15
16#include <iostream>
17
18/*---------------------------------------------------------------------------*/
19/*---------------------------------------------------------------------------*/
20
21namespace Arccore
22{
23
24/*---------------------------------------------------------------------------*/
25/*---------------------------------------------------------------------------*/
26
27IndexOutOfRangeException::
28IndexOutOfRangeException(const TraceInfo& where,const String& message,
29 Int64 index,Int64 min_value_inclusive,
30 Int64 max_value_exclusive)
31: Exception("IndexOutOfRange",where,message)
32, m_index(index)
33, m_min_value_inclusive(min_value_inclusive)
34, m_max_value_exclusive(max_value_exclusive)
35{
36}
37
38/*---------------------------------------------------------------------------*/
39/*---------------------------------------------------------------------------*/
40
41void IndexOutOfRangeException::
42explain(std::ostream& m) const
43{
44 m << "Index '" << m_index << "' out of bounds ("
45 << m_min_value_inclusive << " <= "
46 << m_index << " < "
47 << m_max_value_exclusive << ").\n";
48}
49
50/*---------------------------------------------------------------------------*/
51/*---------------------------------------------------------------------------*/
52
53} // End namespace Arccore
54
55/*---------------------------------------------------------------------------*/
56/*---------------------------------------------------------------------------*/
57
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition Lima.cc:120
Espace de nom de Arccore.
Definition ArcaneTypes.h:24