This module defines the base error handler type for CABLE. It provides a default implementation of the error handling behaviour, which can be extended to provide custom error handling.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public, | parameter | :: | DEFAULT_ERROR_CODE | = | 999 |
Default error code to use when none is provided |
Base error handler type for CABLE. This type provides a default implementation of the error handling behaviour.
| procedure, public :: build_error_message => cable_error_handler_base_build_error_message | |
| procedure, public :: abort => cable_error_handler_base_abort |
Build an error message string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_error_handler_base_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | message |
Error message to display |
||
| character(len=*), | intent(in) | :: | file |
Source file where the error occurred |
||
| integer, | intent(in) | :: | line |
Line number where the error occurred |
||
| integer, | intent(in), | optional | :: | error_code |
Optional error code |
Default implementation of the abort procedure for the base error handler.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_error_handler_base_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | message |
Error message to display |
||
| character(len=*), | intent(in) | :: | file |
Source file where the error occurred |
||
| integer, | intent(in) | :: | line |
Line number where the error occurred |
||
| integer, | intent(in), | optional | :: | error_code |
Optional error code |