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 297 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 864 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 857 of file Moose.C.

858{
859 // May be a touch expensive to create a new DM every time, but probably safer to do it this way
861}
862
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 866 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 319 of file Moose.h.


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