Raise an exception.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(numdiff_type), | intent(inout) | :: | me | |||
integer, | intent(in) | :: | istat |
error code. |
||
character(len=*), | intent(in) | :: | routine |
the routine where the error was raised. |
||
character(len=*), | intent(in) | :: | error_msg |
error message string. |
subroutine raise_exception(me,istat,routine,error_msg) implicit none class(numdiff_type),intent(inout) :: me integer,intent(in) :: istat !! error code. character(len=*),intent(in) :: routine !! the routine where the error was raised. character(len=*),intent(in) :: error_msg !! error message string. me%istat = istat me%error_msg = 'Error in '//trim(routine)//' : '//trim(error_msg) me%exception_raised = .true. end subroutine raise_exception