Check for error occurencies.
If is_severe=.true.
an stop is called.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrator_object), | intent(inout) | :: | self | Integrator. |
||
integer(kind=I_P), | intent(in) | :: | error | Error status code. |
||
character(len=*), | intent(in), | optional | :: | error_message | Error message, hopefully meaningful. |
|
logical, | intent(in), | optional | :: | is_severe | Flag to activate severe faliure, namely errors trigger a stop. |
subroutine trigger_error(self, error, error_message, is_severe)
!< Check for error occurencies.
!<
!< If `is_severe=.true.` an stop is called.
class(integrator_object), intent(inout) :: self !< Integrator.
integer(I_P), intent(in) :: error !< Error status code.
character(len=*), intent(in), optional :: error_message !< Error message, hopefully meaningful.
logical, intent(in), optional :: is_severe !< Flag to activate severe faliure, namely errors trigger a stop.
self%error = error
if (present(error_message)) self%error_message = error_message
call self%check_error(is_severe=is_severe)
endsubroutine trigger_error