NAG CPP Interface
error_handler::ErrorHandler

Settings help

CPP Name Style:


 #include "include/utility/nagcpp_error_handler.hpp"

 class ErrorHandler

1 Description

A class that handles warnings and errors returned by the algorithmic engine.

2 Variables

2.1Public Variables

category ErrorCategory Scalar
This enumerator indicates whether an error or warning has been raised.
None
No error or warning was raised.
Error
An error was raised.
Warning
A warning was raised.
contact_nag bool Scalar
Set to true if this is a contact NAG type situation. This should not happen in usual usage.
eptr std::exception_ptr Scalar
See eptr.
error_handler_type ErrorHandlerType Scalar
This is used to indicate the error handling behaviour.
ThrowNothing
Warnings and errors that are returned by the algorithmic engine will not throw any exception. Error handling must be done via the ErrorHandler class.
It should be noted that setting this value does not guarantee that no exceptions will be thrown it just suppresses those that would have been thrown via ErrorHandler.
ThrowErrors
Errors that are returned by the algorithmic engine will cause an exception to be thrown. Warnings will not. The checking of warnings must be done via the ErrorHandler class.
ThrowAll
Both warnings and errors that are returned by the algorithmic engine will be thrown as exceptions.
In the case of a warning all output arguments will have been set prior to the exception being raised. For a non-void function the return value can be accessed via WarningException::return_value.
In the case of an error, all output arguments are undefined.
error_thrown bool Scalar
Set to true if an error was returned by the algorithmic engine.
errorid types::f77_integer Scalar
A numeric error code associated with an error or warning. This is the same value as would have been returned in errorid if errors / warnings were being raised as exceptions.
fun_name std::string Scalar
Name of the NAG CPP Interface function that returned the warning or error.
msg std::string Scalar
Description of the warning or error.
type ErrorType Scalar
This enumerator indicates the type of error / warning raised.
MemoryError
The raised error indicates some issue during memory allocation.
LicenceError
The raised error indicates an issue with the licence of the NAG Library.
UnexpectedError
The raised error was not expected. Please contact NAG via the NAG Technical Support Service with details of the error message and what you were doing when it occurred.
CallbackError
The error was raised in a callback.
GeneralError
The error was raised by the algorithmic engine, and no more descriptive type was appropriate.
GeneralWarning
The warning was raised by the algorithmic engine, and no more descriptive type was appropriate.
GenericError
As per ErrorType::GeneralError, but the error was raised by the wrapper as opposed to the algorithmic engine.
NoError
No error or warning was raised.
warning_thrown bool Scalar
Set to true if a warning was returned by the algorithmic engine.

3 Methods

void function  ErrorHandler::reset()