Cbeam
Loading...
Searching...
No Matches
cbeam::error::out_of_range Class Reference

A Cbeam-specific out_of_range error that also behaves like std::out_of_range. More...

#include <out_of_range.hpp>

Inheritance diagram for cbeam::error::out_of_range:
Collaboration diagram for cbeam::error::out_of_range:

Public Member Functions

 out_of_range (const std::string &what_arg)
 Constructs an out_of_range error with the specified message.
 
 ~out_of_range () override=default
 Virtual destructor.
 
const char * what () const noexcept override
 Returns the descriptive string of this error.
 
- Public Member Functions inherited from cbeam::error::base_error
 base_error ()=default
 Default constructor.
 
 ~base_error () override=default
 Virtual destructor.
 
const char * what () const noexcept override
 Returns a generic explanatory string for all Cbeam base errors.
 

Detailed Description

A Cbeam-specific out_of_range error that also behaves like std::out_of_range.

This class inherits from cbeam::error::base_error and std::out_of_range via virtual inheritance. As a result, throwing this exception can be caught by:

  • catch(const cbeam::error::base_error&)
  • catch(const cbeam::error::out_of_range&)
  • catch(const std::out_of_range&)
  • catch(const std::logic_error&)
  • catch(const std::exception&)

Constructor & Destructor Documentation

◆ out_of_range()

cbeam::error::out_of_range::out_of_range ( const std::string & what_arg)
inlineexplicit

Constructs an out_of_range error with the specified message.

Parameters
what_argThe error message describing the out-of-range condition.

◆ ~out_of_range()

cbeam::error::out_of_range::~out_of_range ( )
overridedefault

Virtual destructor.

Member Function Documentation

◆ what()

const char * cbeam::error::out_of_range::what ( ) const
inlineoverridenoexcept

Returns the descriptive string of this error.


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