Reaktoro
A unified framework for modeling chemically reactive systems
Exception Struct Reference

Provides a convenient way to initialized an exception with helpful error messages. More...

#include <Exception.hpp>

Collaboration diagram for Exception:
[legend]

Public Attributes

std::stringstream error
 The error message to be displayed when the exception is raised.
 
std::stringstream reason
 The reason message to be displayed when the exception is raised.
 

Detailed Description

Provides a convenient way to initialized an exception with helpful error messages.

Usage Below we demonstrate a convenient way to raise an exception using an Exception instance and the raise macro.

using namespace Reaktoro;
Exception exception;
exception.error << "Cannot calculate the actitivy of species " << species.name() << ".";
exception.reason << "The species " << species.name() << " does not exist in the chemical system.";
RaiseError(exception);
See also
raise

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