OpenMS
IndexOverflow Class Reference

Int overflow exception. More...

#include <OpenMS/CONCEPT/Exception.h>

Inheritance diagram for IndexOverflow:
[legend]
Collaboration diagram for IndexOverflow:
[legend]

Public Member Functions

 IndexOverflow (const char *file, int line, const char *function, SignedSize index=0, Size size=0) noexcept
 
- Public Member Functions inherited from BaseException
 BaseException () noexcept
 Default constructor. More...
 
 BaseException (const char *file, int line, const char *function) noexcept
 Constructor. More...
 
 BaseException (const char *file, int line, const char *function, const std::string &name, const std::string &message) noexcept
 Constructor. More...
 
 BaseException (const BaseException &exception) noexcept
 Copy constructor. More...
 
 ~BaseException () noexcept override
 Destructor. More...
 
const char * getName () const noexcept
 Returns the name of the exception. More...
 
int getLine () const noexcept
 Returns the line number where it occurred. More...
 
const char * getFile () const noexcept
 Returns the file where it occurred. More...
 
const char * getFunction () const noexcept
 Returns the function where it occurred. More...
 
const char * getMessage () const noexcept
 Returns the message. More...
 

Additional Inherited Members

- Protected Attributes inherited from BaseException
const char * file_
 The source file the exception was thrown in. More...
 
int line_
 The line number the exception was thrown in. More...
 
const char * function_
 The source file the exception was thrown in. More...
 
std::string name_
 The name of the exception. More...
 

Detailed Description

Int overflow exception.

Throw this exception to indicate an index that was larger than allowed. The constructor has two additional arguments, the values of which should be set to the index that caused the failure and the largest allowed value to simplify debugging.

Parameters
indexthe value of the index causing the problem
sizelargest value allowed for index

Constructor & Destructor Documentation

◆ IndexOverflow()

IndexOverflow ( const char *  file,
int  line,
const char *  function,
SignedSize  index = 0,
Size  size = 0 
)
noexcept