mctc_env_error Module

Central registry for error codes


Variables

Type Visibility Attributes Name Initial
type(enum_stat), public, parameter :: mctc_stat = enum_stat()

Actual enumerator for return states


Derived Types

type, public ::  error_type

Error message

Components

Type Visibility Attributes Name Initial
character(len=:), public, allocatable :: message

Payload of the error

integer, public :: stat

Error code


Subroutines

public subroutine fatal_error(error, message, stat)

A fatal error is encountered

Arguments

Type IntentOptional Attributes Name
type(error_type), intent(out), allocatable :: error

Instance of the error

character(len=*), intent(in), optional :: message

A detailed message describing the error and (optionally) offering advice

integer, intent(in), optional :: stat

Overwrite of the error code