LBANN  0.103.0
LivermoreBigArtificialNeuralNetworkToolkit
lbann::exception Class Reference

The base exception for LBANN errors. More...

#include <exception.hpp>

Inheritance diagram for lbann::exception:
[legend]
Collaboration diagram for lbann::exception:
[legend]

Public Member Functions

 exception ()
 Default constructor. More...
 
 exception (std::string message)
 Constructor with message. More...
 
char const * what () const noexcept override
 
void print_report (std::ostream &os=std::cerr) const
 Print the what() string to the stream. More...
 

Private Attributes

std::string m_message
 

Detailed Description

The base exception for LBANN errors.

A stack trace is recorded when the exception is constructed.

Definition at line 118 of file exception.hpp.

Constructor & Destructor Documentation

◆ exception() [1/2]

lbann::exception::exception ( )

Default constructor.

Uses a generic message that reports the rank and stack trace.

◆ exception() [2/2]

lbann::exception::exception ( std::string  message)

Constructor with message.

The message is interpolated into a longer report that includes the stack trace from where the constructor is called. Unfortunately, the constructor frame is usually included in that stack trace.

Member Function Documentation

◆ print_report()

void lbann::exception::print_report ( std::ostream &  os = std::cerr) const

Print the what() string to the stream.

◆ what()

char const* lbann::exception::what ( ) const
overridenoexcept
Here is the caller graph for this function:

Member Data Documentation

◆ m_message

std::string lbann::exception::m_message
private

Human-readable exception message.

Definition at line 143 of file exception.hpp.


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