CppNoddy  0.92
Loading...
Searching...
No Matches
Public Member Functions | List of all members
CppNoddy::ExceptionRange Class Reference

An exception to indicate that a CppNoddy container has been accessed with index/indices outside the maximum range for the container. More...

#include <Exceptions.h>

Inheritance diagram for CppNoddy::ExceptionRange:

Public Member Functions

 ExceptionRange (const std::string &problem, const std::size_t &size1, const std::size_t &index1)
 
 ExceptionRange (const std::string &problem, const std::size_t &size1, const std::size_t &index1, const std::size_t &size2, const std::size_t &index2)
 

Detailed Description

An exception to indicate that a CppNoddy container has been accessed with index/indices outside the maximum range for the container.

Definition at line 117 of file Exceptions.h.

Constructor & Destructor Documentation

◆ ExceptionRange() [1/2]

CppNoddy::ExceptionRange::ExceptionRange ( const std::string &  problem,
const std::size_t &  size1,
const std::size_t &  index1 
)
inline

Definition at line 120 of file Exceptions.h.

120 :
121 std::runtime_error(problem) {
122#ifdef WHAT
123 error_header();
124 std::cout << problem << "\n";
125 std::cout << " Range error for one-dimensional container.\n";
126 std::cout << " Size 1 of container = " << size1 << "\n";
127 std::cout << " Index 1 being accessed = " << index1 << "\n\n";
128#endif
129
130 }

◆ ExceptionRange() [2/2]

CppNoddy::ExceptionRange::ExceptionRange ( const std::string &  problem,
const std::size_t &  size1,
const std::size_t &  index1,
const std::size_t &  size2,
const std::size_t &  index2 
)
inline

Definition at line 132 of file Exceptions.h.

133 :
134 std::runtime_error(problem) {
135#ifdef WHAT
136 error_header();
137 std::cout << problem << "\n";
138 std::cout << " Range error for two-dimensional container.\n";
139 std::cout << " Size 1 of container = " << size1 << "\n";
140 std::cout << " Size 2 of container = " << size2 << "\n";
141 std::cout << " Index 1 being accessed = " << index1 << "\n";
142 std::cout << " Index 2 being accessed = " << index2 << "\n\n";
143#endif
144
145 }

The documentation for this class was generated from the following file:

© 2012

R.E. Hewitt