https://mooseframework.inl.gov
Public Member Functions | Private Attributes | List of all members
MooseRuntimeError Class Reference

Exception to be thrown whenever we have _throw_on_error set and a mooseError() is emitted. More...

#include <MooseError.h>

Inheritance diagram for MooseRuntimeError:
[legend]

Public Member Functions

 MooseRuntimeError (const std::string &message, const hit::Node *const node)
 
const hit::Node * getNode () const
 Get the associated hit node, if any. More...
 

Private Attributes

const hit::Node *const _node
 The associated hit node, if any. More...
 

Detailed Description

Exception to be thrown whenever we have _throw_on_error set and a mooseError() is emitted.

Enables adding the context of the hit node from the location in input associated with the error, which can be used in the MooseServer to produce diagnostics without parsing messages.

Definition at line 117 of file MooseError.h.

Constructor & Destructor Documentation

◆ MooseRuntimeError()

MooseRuntimeError::MooseRuntimeError ( const std::string &  message,
const hit::Node *const  node 
)
inline

Definition at line 120 of file MooseError.h.

121  : runtime_error(message), _node(node)
122  {
123  }
const hit::Node *const _node
The associated hit node, if any.
Definition: MooseError.h:130

Member Function Documentation

◆ getNode()

const hit::Node* MooseRuntimeError::getNode ( ) const
inline

Get the associated hit node, if any.

Definition at line 126 of file MooseError.h.

126 { return _node; }
const hit::Node *const _node
The associated hit node, if any.
Definition: MooseError.h:130

Member Data Documentation

◆ _node

const hit::Node* const MooseRuntimeError::_node
private

The associated hit node, if any.

Definition at line 130 of file MooseError.h.

Referenced by getNode().


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