Check if the error matches a specific error code
Usage: if (err%is(ERROR_IO)) then ! handle IO errors specifically end if
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(error_t), | intent(in) | :: | self | |||
| integer(kind=default_int), | intent(in) | :: | code |
pure function error_is(self, code) result(matches) !! Check if the error matches a specific error code !! !! Usage: !! if (err%is(ERROR_IO)) then !! ! handle IO errors specifically !! end if class(error_t), intent(in) :: self integer(default_int), intent(in) :: code logical :: matches matches = (self%code == code) end function error_is