version  0.0.1
Defines the C++ API for MsPASS
Loading...
Searching...
No Matches
Public Member Functions | List of all members
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:
mspass::utility::MsPASSError

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.

\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
35 {
36 row = ir;
37 column = ic;
38 nrr = nrmax;
39 ncc = ncmax;
40 std::ostringstream oss;
41 oss << "dmatrix object: indexing error" << std::endl
42 << "Matrix index (" << row << "," << column
43 << ")is outside range = " << nrr << "," << ncc << std::endl;
44 message = oss.str();
45 badness = ErrorSeverity::Invalid;
46 };
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
48{};

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