Loading...
Searching...
No Matches
pot::EngineError Class Reference

#include <gpr/potentials/EnginePotential.h>

Inheritance diagram for pot::EngineError:

Public Member Functions

 EngineError (std::string library, int status, const std::string &what)
int status () const noexcept
bool fatal () const noexcept
const std::string & library () const noexcept

Detailed Description

A failed engine evaluation. The engine ABI returns a three-valued status: positive means the evaluation failed at this input and the caller may evaluate elsewhere, negative means the instance is unusable.

Definition at line 24 of file EnginePotential.h.

Constructor & Destructor Documentation

◆ EngineError()

pot::EngineError::EngineError ( std::string library,
int status,
const std::string & what )

Definition at line 183 of file EnginePotential.cpp.

185 : std::runtime_error(what), library_(std::move(library)), status_(status)
186{
187}
const std::string & library() const noexcept
int status() const noexcept

Member Function Documentation

◆ fatal()

bool pot::EngineError::fatal ( ) const
inlinenodiscardnoexcept

Definition at line 32 of file EnginePotential.h.

33 {
34 return status_ < 0;
35 }

◆ library()

const std::string & pot::EngineError::library ( ) const
inlinenodiscardnoexcept

Definition at line 36 of file EnginePotential.h.

37 {
38 return library_;
39 }

◆ status()

int pot::EngineError::status ( ) const
inlinenodiscardnoexcept

Definition at line 28 of file EnginePotential.h.

29 {
30 return status_;
31 }

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