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

Indicates something went seriously wrong and likely indicates corruption in simulator runtime state. More...

#include <SpartaException.hpp>

Inheritance diagram for sparta::SpartaCriticalError:
Collaboration diagram for sparta::SpartaCriticalError:

Public Member Functions

 SpartaCriticalError ()
 Construct a SpartaCriticalException object.
 
 SpartaCriticalError (const std::string &reason)
 Construct a SpartaCriticalException 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 corruption in simulator runtime state.

This exception should be thrown only if a rule of the framework is broken.

This exception is slightly less severe than a fatal error, but in most cases the simulator should attempt to enter a safe debugging mode instead of exiting.

Definition at line 166 of file SpartaException.hpp.

Constructor & Destructor Documentation

◆ SpartaCriticalError() [1/2]

sparta::SpartaCriticalError::SpartaCriticalError ( )
inline

Construct a SpartaCriticalException object.

Reason can be populated later with the insertion operator.

Definition at line 175 of file SpartaException.hpp.

◆ SpartaCriticalError() [2/2]

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

Construct a SpartaCriticalException object.

Parameters
reasonThe reason for the exception

Definition at line 183 of file SpartaException.hpp.


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