libdballeFortranbindings
7.6
|
Error inspection functions for Dballe. More...
#include "handles.h"
#include "trace.h"
#include <wreport/error.h>
#include <stdint.h>
#include <cstring>
#include <cstdio>
#include <f77.h>
Macros | |
#define | MAX_CALLBACKS 50 |
Functions | |
void | dballe::fortran::error_init () |
int | dballe::fortran::error (wreport::error &e) |
int | dballe::fortran::success () |
integer | idba_error_code () |
Return the error code for the last error that happened. More... | |
subroutine | idba_error_message (character message) |
Return the error message for the last error that happened. More... | |
subroutine | idba_error_context (character message) |
Return a string describing the context in which the error happened. More... | |
subroutine | idba_error_details (character message) |
Return a string with additional details about the error. More... | |
integer | idba_error_set_callback (integer code, SUBROUTINE(func), integer data, integer handle) |
Set a callback to be invoked when an error of a specific kind happens. More... | |
integer | idba_error_remove_callback (integer handle) |
Remove a callback set previously. More... | |
integer | idba_default_error_handler (integer debug) |
Default callback that prints a message and exits. More... | |
integer | idba_default_error_handle (integer debug) |
integer | idba_error_handle_tolerating_overflows (integer debug) |
Default callback that prints a message and exists, except in case of overflows. More... | |
Error inspection functions for Dballe.
These funtions closely wrap the Dballe functions in dba_error.h
integer idba_default_error_handler | ( | integer | debug | ) |
Default callback that prints a message and exits.
The message is printed only if a non-zero value is supplied as user data
integer idba_error_code | ( | ) |
Return the error code for the last error that happened.
See dba_error_code()
subroutine idba_error_context | ( | character | message | ) |
Return a string describing the context in which the error happened.
This string describes what the code that failed was trying to do.
See dba_error_context()
message | The string holding the error context. If the string is not long enough, it will be truncated. |
subroutine idba_error_details | ( | character | message | ) |
Return a string with additional details about the error.
This string contains additional details about the error in case the code was able to get extra informations about it, for example by querying the error functions of an underlying module.
See dba_error_details()
message | The string holding the error details. If the string is not long enough, it will be truncated. |
integer idba_error_handle_tolerating_overflows | ( | integer | debug | ) |
Default callback that prints a message and exists, except in case of overflows.
In case of overflows it prints a warning and continues execution
subroutine idba_error_message | ( | character | message | ) |
Return the error message for the last error that happened.
The error message is just a description of the error code. To see more details of the specific condition that caused the error, use fdba_error_context() and fdba_error_details()
See dba_error_message()
message | The string holding the error messag. If the string is not long enough, it will be truncated. |
integer idba_error_remove_callback | ( | integer | handle | ) |
Remove a callback set previously.
handle | The handle previously returned by idba_error_set_callback |
integer idba_error_set_callback | ( | integer | code, |
SUBROUTINE(func) | , | ||
integer | data, | ||
integer | handle | ||
) |
Set a callback to be invoked when an error of a specific kind happens.
code | The error code (See ::dba_err_code) of the error that triggers this callback. If DBA_ERR_NONE is used, then the callback is invoked on all errors. |
func | The function to be called. |
data | An arbitrary integer data that is passed verbatim to the callback function when invoked. |
handle | A handle that can be used to remove the callback |