Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | status | |||
character(len=*), | intent(in) | :: | filename | |||
integer, | intent(in) | :: | line | |||
integer, | intent(out), | optional | :: | rc |
subroutine MAPL_Return(status, filename, line, rc) integer, intent(in) :: status character(*), intent(in) :: filename integer, intent(in) :: line integer, intent(out), optional :: rc logical :: condition, fail character(:), allocatable :: message condition = (status == 0) fail = .not. condition if (fail) then message = get_error_message(status) !$omp critical (MAPL_ErrorHandling4) call MAPL_throw_exception(filename, line, message=message) !$omp end critical (MAPL_ErrorHandling4) end if ! Regardless of error: if (present(rc)) rc = status end subroutine MAPL_Return