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 143 of file MooseError.h.

Constructor & Destructor Documentation

◆ MooseRuntimeError()

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

Definition at line 146 of file MooseError.h.

147  : runtime_error(message), _node(node)
148  {
149  }
const hit::Node *const _node
The associated hit node, if any.
Definition: MooseError.h:156

Member Function Documentation

◆ getNode()

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

Get the associated hit node, if any.

Definition at line 152 of file MooseError.h.

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

Member Data Documentation

◆ _node

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

The associated hit node, if any.

Definition at line 156 of file MooseError.h.

Referenced by getNode().


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