Error handling module for fortplot library Provides centralized error management with status codes and messages
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public, | parameter | :: | SUCCESS | = | 0 | |
| integer, | public, | parameter | :: | ERROR_INVALID_INPUT | = | 1 | |
| integer, | public, | parameter | :: | ERROR_DIMENSION_MISMATCH | = | 2 | |
| integer, | public, | parameter | :: | ERROR_RESOURCE_LIMIT | = | 3 | |
| integer, | public, | parameter | :: | ERROR_INTERNAL | = | 4 | |
| integer, | public, | parameter | :: | ERROR_FILE_IO | = | 5 | 
Error result type containing status and message
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | status | = | SUCCESS | ||
| character(len=MAX_ERROR_MESSAGE), | public | :: | message | = | "" | 
| procedure, public :: set_error | |
| procedure, public :: clear_error | |
| procedure, public :: is_error => error_has_error | 
Status type for simpler error handling
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | code | = | SUCCESS | 
Check if status code indicates an error
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | status | 
Get descriptive error message for status code
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | status | 
Log error message to error unit
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | status | |||
| character(len=*), | intent(in), | optional | :: | context |