Error object class.
Handler of errors/excetpions.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(len=:), | public, | allocatable | :: | message | Error message. |
||
integer(kind=I4P), | public | :: | status | = | 0_I4P | Error status. |
Overload =
.
Operator =
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(error_object), | intent(inout) | :: | lhs | Left hand side. |
||
type(error_object), | intent(in) | :: | rhs | Right hand side. |
Check error status.
Check error status.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(error_object), | intent(inout) | :: | self | Error object. |
||
character(len=*), | intent(in), | optional | :: | message | Error message. |
|
logical, | intent(in), | optional | :: | is_severe | Enable severe error. |
Destroy error.
Destroy error.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(error_object), | intent(inout) | :: | self | Error object. |
Operator =
.
Operator =
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(error_object), | intent(inout) | :: | lhs | Left hand side. |
||
type(error_object), | intent(in) | :: | rhs | Right hand side. |
Initialize error.
Initialize error.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(error_object), | intent(inout) | :: | self | Error object. |
type :: error_object
!< Error object class.
!<
!< Handler of errors/excetpions.
integer(I4P) :: status=0_I4P !< Error status.
character(len=:), allocatable :: message !< Error message.
contains
! public methods
procedure, pass(self) :: check !< Check error status.
procedure, pass(self) :: destroy !< Destroy error.
procedure, pass(self) :: initialize !< Initialize error.
! operators
generic :: assignment(=) => err_assign_err !< Overload `=`.
! private methods
procedure, pass(lhs) :: err_assign_err !< Operator `=`.
endtype error_object