Returns the current error code and message.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(numdiff_type), | intent(in) | :: | me | |||
integer, | intent(out), | optional | :: | istat |
error code ( |
|
character(len=:), | intent(out), | optional, | allocatable | :: | error_msg |
error message string. |
subroutine get_error_status(me,istat,error_msg) implicit none class(numdiff_type),intent(in) :: me integer,intent(out),optional :: istat !! error code (`istat=0` means no errors). character(len=:),allocatable,intent(out),optional :: error_msg !! error message string. if (present(istat)) istat = me%istat if (present(error_msg)) then if (allocated(me%error_msg)) then error_msg = me%error_msg else error_msg = '' end if end if end subroutine get_error_status