LibrePCB Developers Documentation
RangeError Class Referencefinal

The RangeError class. More...

#include <exceptions.h>

+ Inheritance diagram for RangeError:
+ Collaboration diagram for RangeError:

Public Member Functions

 RangeError ()=delete
 Default Constructor. More...
 
 RangeError (const char *file, int line, const QString &msg=QString("Range Error")) noexcept
 The default constructor. More...
 
template<typename Tval , typename Tmin , typename Tmax >
 RangeError (const char *file, int line, const Tval &value, const Tmin &min, const Tmax &max) noexcept
 
 RangeError (const RangeError &other) noexcept
 The copy constructor (needed for clone()) More...
 
virtual void raise () const override
 
virtual RangeErrorclone () const override
 
- Public Member Functions inherited from RuntimeError
 RuntimeError ()=delete
 Default Constructor. More...
 
 RuntimeError (const char *file, int line, const QString &msg=QString("Runtime Error")) noexcept
 The default constructor. More...
 
 RuntimeError (const RuntimeError &other) noexcept
 The copy constructor (needed for clone()) More...
 
virtual ~RuntimeError () noexcept
 Destructor. More...
 
virtual void raise () const override
 
virtual RuntimeErrorclone () const override
 
- Public Member Functions inherited from Exception
 Exception ()=delete
 The default constructor. More...
 
 Exception (const Exception &other) noexcept
 The copy constructor (needed for clone()) More...
 
 Exception (const char *file, int line, const QString &msg=QString("Exception")) noexcept
 The constructor which is used to throw an exception. More...
 
virtual ~Exception () noexcept
 The destructor. More...
 
const QString & getMsg () const
 Get the error message (translated) More...
 
const QString & getFile () const
 Get the source file where the exception was thrown. More...
 
int getLine () const
 Get the line number where the exception was thrown. More...
 
const char * what () const noexcept override
 reimplemented from std::exception::what() More...
 
virtual void raise () const override
 
virtual Exceptionclone () const override
 

Detailed Description

The RangeError class.

This exception class is used for range under-/overflows.

See also
Exception

Constructor & Destructor Documentation

◆ RangeError() [1/4]

RangeError ( )
delete

Default Constructor.

+ Here is the caller graph for this function:

◆ RangeError() [2/4]

RangeError ( const char *  file,
int  line,
const QString &  msg = QString("Range Error") 
)
noexcept

The default constructor.

◆ RangeError() [3/4]

RangeError ( const char *  file,
int  line,
const Tval &  value,
const Tmin &  min,
const Tmax &  max 
)
inlinenoexcept

Constructor which produces a message like "42 not in range [13..37]"

Parameters
fileSee librepcb::Exception::Exception()
lineSee librepcb::Exception::Exception()
valueThe invalid value
minThe lower value limit
maxThe upper value limit

◆ RangeError() [4/4]

RangeError ( const RangeError other)
noexcept

The copy constructor (needed for clone())

Member Function Documentation

◆ raise()

virtual void raise ( ) const
inlineoverridevirtual

Reimplemented from RuntimeError.

◆ clone()

virtual RangeError * clone ( ) const
inlineoverridevirtual

Reimplemented from RuntimeError.

+ Here is the call graph for this function:

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