OpenMS  2.6.0
Classes | Functions
Exceptions

Exceptions. More...

Collaboration diagram for Exceptions:

Classes

class  BaseException
 Exception base class. More...
 
class  Precondition
 Precondition failed exception. More...
 
class  Postcondition
 Postcondition failed exception. More...
 
class  MissingInformation
 Not all required information provided. More...
 
class  IndexUnderflow
 Int underflow exception. More...
 
class  SizeUnderflow
 UInt underflow exception. More...
 
class  IndexOverflow
 Int overflow exception. More...
 
class  FailedAPICall
 A call to an external library (other than OpenMS) went wrong. More...
 
class  InvalidRange
 Invalid range exception. More...
 
class  InvalidSize
 Invalid UInt exception. More...
 
class  OutOfRange
 Out of range exception. More...
 
class  InvalidValue
 Invalid value exception. More...
 
class  InvalidParameter
 Exception indicating that an invalid parameter was handed over to an algorithm. More...
 
class  ConversionError
 Invalid conversion exception. More...
 
class  IllegalSelfOperation
 Illegal self operation exception. More...
 
class  NullPointer
 Null pointer argument is invalid exception. More...
 
class  InvalidIterator
 Invalid iterator exception. More...
 
class  IncompatibleIterators
 Incompatible iterator exception. More...
 
class  NotImplemented
 Not implemented exception. More...
 
class  IllegalTreeOperation
 Illegal tree operation exception. More...
 
class  OutOfMemory
 Out of memory exception. More...
 
class  BufferOverflow
 Buffer overflow exception. More...
 
class  DivisionByZero
 Division by zero error exception. More...
 
class  OutOfGrid
 Out of grid exception. More...
 
class  FileNotFound
 File not found exception. More...
 
class  FileNotReadable
 File not readable exception. More...
 
class  FileNotWritable
 File not writable exception. More...
 
class  FileNameTooLong
 Filename is too long to be writable/readable by the filesystem. More...
 
class  IOException
 General IOException. More...
 
class  FileEmpty
 File is empty. More...
 
class  IllegalPosition
 Invalid 3-dimensional position exception. More...
 
class  ParseError
 Parse Error exception. More...
 
class  UnableToCreateFile
 Unable to create file exception. More...
 
class  IllegalArgument
 A method or algorithm argument contains illegal values. More...
 
class  ElementNotFound
 Element could not be found exception. More...
 
class  UnableToFit
 Exception used if an error occurred while fitting a model to a given dataset. More...
 
class  UnableToCalibrate
 Exception used if an error occurred while calibrating a dataset. More...
 
class  DepletedIDPool
 Exception used if no more unique document ID's can be drawn from ID pool. More...
 
class  GlobalExceptionHandler
 OpenMS global exception handler. More...
 
class  Map< Key, T >::IllegalKey
 Map illegal key exception. More...
 

Functions

std::ostream & operator<< (std::ostream &os, const Exception::BaseException &e)
 Output operator for exceptions. More...
 

Detailed Description

Exceptions.

Function Documentation

◆ operator<<()

std::ostream& OpenMS::operator<< ( std::ostream &  os,
const Exception::BaseException e 
)

Output operator for exceptions.

All OpenMS exceptions can be printed to an arbitrary output stream. Information written contains the exception class, the error message, and the location (file, line number). The following code block can thus be used to catch any OpenMS exceptions and convert them to human readable information:

try
{
.... // some code which potentially throws an exception
}
catch (Exception::Exception e)
{
Log.error() << "caught exception: " << e << std::endl;
}