Fix error_impl, and add check_error()

This commit is contained in:
Salvatore Filippone
2021-02-05 09:50:02 +01:00
parent fdd1da6fa1
commit aeb1397e9f
4 changed files with 38 additions and 6 deletions
+11 -1
View File
@@ -162,6 +162,7 @@ module psb_error_mod
logical, save :: comm_global_checks = .false.
contains
subroutine psb_set_global_checks(val)
logical, intent(in), optional :: val
@@ -182,7 +183,16 @@ contains
val = comm_global_checks
end function psb_get_global_checks
subroutine psb_check_error(ctxt,abrt)
implicit none
type(psb_ctxt_type), intent(in) :: ctxt
logical, optional, intent(in) :: abrt
if (psb_errstatus_fatal()) then
call psb_error(ctxt,abrt)
end if
end subroutine psb_check_error
! saves action to support error traceback
! also changes error action to "return"