The Sparta Modeling Framework
Loading...
Searching...
No Matches
sparta::SpartaFatalError Class Reference

Indicates something went seriously wrong and likely indicates unrecoverable corruption in simulator runtime state or misuse. This is the only exception that should ever be generated by a destructor since its semantics are that the simulation should terminate. More...

#include <SpartaException.hpp>

Inheritance diagram for sparta::SpartaFatalError:
Collaboration diagram for sparta::SpartaFatalError:

Public Member Functions

 SpartaFatalError ()
 Construct a SpartaFatalError object.
 
 SpartaFatalError (const std::string &reason)
 Construct a SpartaFatalError object.
 
- Public Member Functions inherited from sparta::SpartaException
 SpartaException ()
 Construct a SpartaException object with empty reason.
 
 SpartaException (const std::string &reason)
 Construct a SpartaException object.
 
 SpartaException (const SpartaException &orig)
 Copy construct a SpartaException object.
 
virtual ~SpartaException () noexcept
 Destroy!
 
const char * what () const noexcept
 Overload from std::exception.
 
std::string backtrace () const noexcept
 Returns the backtrace at the time this exception was generated.
 
std::string rawReason () const
 Return the raw reason without file, line information.
 
template<class T >
SpartaExceptionoperator<< (const T &msg)
 Append additional information to the message.
 

Detailed Description

Indicates something went seriously wrong and likely indicates unrecoverable corruption in simulator runtime state or misuse. This is the only exception that should ever be generated by a destructor since its semantics are that the simulation should terminate.

This exception should generally only be thrown only if a fundamental rule of the framework is broken related to framework object instantiation (e.g. object destructed twice).

Simulator should generally exit or allow this error to propogate, causing an abort instead of entering a simulator-managed non-executing debug state.

Definition at line 202 of file SpartaException.hpp.

Constructor & Destructor Documentation

◆ SpartaFatalError() [1/2]

sparta::SpartaFatalError::SpartaFatalError ( )
inline

Construct a SpartaFatalError object.

Reason can be populated later with the insertion operator.

Definition at line 211 of file SpartaException.hpp.

◆ SpartaFatalError() [2/2]

sparta::SpartaFatalError::SpartaFatalError ( const std::string &  reason)
inline

Construct a SpartaFatalError object.

Parameters
reasonThe reason for the exception

Definition at line 219 of file SpartaException.hpp.


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