MsPASS C++ API  2.4.4.dev122+gb075c5a7b
Defines the C++ API for MsPASS
Loading...
Searching...
No Matches
mspass::utility::dmatrix_index_error Class Reference

special convenience class for matrix indexing errors. More...

#include <dmatrix.h>

Inheritance diagram for mspass::utility::dmatrix_index_error:
Collaboration diagram for mspass::utility::dmatrix_index_error:

Public Member Functions

 dmatrix_index_error (const size_t nrmax, const size_t ncmax, const size_t ir, const size_t ic)
Public Member Functions inherited from mspass::utility::MsPASSError
 MsPASSError ()
 MsPASSError (const std::string mess, const char *howbad)
 Construct from a std::string with badness defined by keywords in a string.
 MsPASSError (const std::string mess, const ErrorSeverity s=ErrorSeverity::Invalid)
 MsPASSError (const char *mess, const ErrorSeverity s)
void log_error ()
void log_error (std::ostream &ofs)
const char * what () const noexcept
ErrorSeverity severity () const

Additional Inherited Members

Protected Attributes inherited from mspass::utility::MsPASSError
std::string message
ErrorSeverity badness

Detailed Description

special convenience class for matrix indexing errors.

Thrown by a dmatrix if a requested index is outside the bounds of the matrix dimension.

autotoc_md0

Author
Gary L. Pavlis

Constructor & Destructor Documentation

◆ dmatrix_index_error()

mspass::utility::dmatrix_index_error::dmatrix_index_error ( const size_t nrmax,
const size_t ncmax,
const size_t ir,
const size_t ic )
inline

Basic constructor for this error object.

Parameters
nrmaxnumber of rows in matrix
ncmaxnumber of columns in matrix
irrow index requested
iccolumn index requested
36 {
37 row = ir;
38 column = ic;
39 nrr = nrmax;
40 ncc = ncmax;
41 std::ostringstream oss;
42 oss << "dmatrix object: indexing error" << std::endl
43 << "Matrix index (" << row << "," << column
44 << ")is outside range = " << nrr << "," << ncc << std::endl;
45 message = oss.str();
46 badness = ErrorSeverity::Invalid;
47 };
std::string message
Definition MsPASSError.h:108
ErrorSeverity badness
Definition MsPASSError.h:110

References mspass::utility::MsPASSError::badness, and mspass::utility::MsPASSError::message.

◆ ~dmatrix_index_error()

mspass::utility::dmatrix_index_error::~dmatrix_index_error ( )
throw ( )
inline
49{};

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