https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Moose::ScopedThrowOnError Class Reference

Scoped helper for setting Moose::_throw_on_error during this scope. More...

#include <Moose.h>

Public Member Functions

 ScopedThrowOnError ()
 Default constructor, which sets Moose::_throw_on_error = true.
 
 ScopedThrowOnError (const bool throw_on_error)
 Specialized constructor, which sets Moose::_throw_on_error based on the argument throw_on_error.
 
 ~ScopedThrowOnError ()
 Destructor, which sets Moose::_throw_on_error to what it was upon construction.
 

Private Attributes

const bool _throw_on_error_before
 The value of Moose::_throw_on_error at construction.
 

Detailed Description

Scoped helper for setting Moose::_throw_on_error during this scope.

Cannot be used within threads.

Definition at line 307 of file Moose.h.

Constructor & Destructor Documentation

◆ ScopedThrowOnError() [1/2]

Moose::ScopedThrowOnError::ScopedThrowOnError ( )

Default constructor, which sets Moose::_throw_on_error = true.

Definition at line 879 of file Moose.C.

◆ ScopedThrowOnError() [2/2]

Moose::ScopedThrowOnError::ScopedThrowOnError ( const bool  throw_on_error)

Specialized constructor, which sets Moose::_throw_on_error based on the argument throw_on_error.

Definition at line 872 of file Moose.C.

873{
874 // May be a touch expensive to create a new DM every time, but probably safer to do it this way
876}
877
void petscSetDefaults(FEProblemBase &problem)
Sets the default options for PETSc.

◆ ~ScopedThrowOnError()

Moose::ScopedThrowOnError::~ScopedThrowOnError ( )

Destructor, which sets Moose::_throw_on_error to what it was upon construction.

Definition at line 881 of file Moose.C.

Member Data Documentation

◆ _throw_on_error_before

const bool Moose::ScopedThrowOnError::_throw_on_error_before
private

The value of Moose::_throw_on_error at construction.

Definition at line 329 of file Moose.h.


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