svMultiPhysics
Loading...
Searching...
No Matches
Public Member Functions | List of all members
svmp::FE::BackendException Class Reference

Failure reported by a linear-algebra or solver backend. More...

#include <FEException.h>

Inheritance diagram for svmp::FE::BackendException:
[legend]

Public Member Functions

 BackendException (const std::string &message, std::string backend_name="", int error_code=0)
 Construct with a message and optional backend context.
 
const std::string & backend_name () const noexcept
 Name of the failing backend.
 
int error_code () const noexcept
 Backend-native error code.
 
- Public Member Functions inherited from svmp::FE::FEException
 FEException (const std::string &message, StatusCode status=StatusCode::Unknown)
 Construct with a message and optional status code.
 
StatusCode status () const noexcept
 Status code classifying the failure.
 
- Public Member Functions inherited from svmp::ExceptionBase
const char * what () const noexcept override
 
StatusCode status_code () const noexcept
 
const std::string & message () const noexcept
 
const ExceptionContext & context () const noexcept
 
void add_context (const std::string &context)
 
void set_source_location (const SourceLocation &location)
 Record the originating source location and refresh what().
 

Additional Inherited Members

- Protected Member Functions inherited from svmp::ExceptionBase
 ExceptionBase (std::string message, StatusCode status, std::string_view subsystem_label, const char *file="", int line=0, const char *function="")
 
void rebuild_what ()
 
- Protected Attributes inherited from svmp::ExceptionBase
std::string message_
 
ExceptionContext context_
 
std::string_view subsystem_label_
 
std::string what_
 

Detailed Description

Failure reported by a linear-algebra or solver backend.

Records the backend name and its native error code so error reports can identify the failing dependency.

Constructor & Destructor Documentation

◆ BackendException()

svmp::FE::BackendException::BackendException ( const std::string &  message,
std::string  backend_name = "",
int  error_code = 0 
)
inline

Construct with a message and optional backend context.

Parameters
messageHuman-readable error description.
backend_nameName of the failing backend; appended to the message when non-empty.
error_codeBackend-native error code; appended to the message when nonzero.

Member Function Documentation

◆ backend_name()

const std::string & svmp::FE::BackendException::backend_name ( ) const
inlinenoexcept

Name of the failing backend.

Returns
Backend name; empty when not provided.

◆ error_code()

int svmp::FE::BackendException::error_code ( ) const
inlinenoexcept

Backend-native error code.

Returns
Error code; zero when not provided.

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