error_fatal Subroutine

private subroutine error_fatal(self, unit)

Print the error trace and stop the program Use for unrecoverable errors

Usage: if (err%has_error()) call err%fatal()

Type Bound

error_t

Arguments

Type IntentOptional Attributes Name
class(error_t), intent(in) :: self
integer(kind=default_int), intent(in), optional :: unit

Calls

proc~~error_fatal~~CallsGraph proc~error_fatal error_t%error_fatal proc~error_has_error error_t%error_has_error proc~error_fatal->proc~error_has_error proc~error_print_trace error_t%error_print_trace proc~error_fatal->proc~error_print_trace proc~error_print_trace->proc~error_has_error proc~code_to_string code_to_string proc~error_print_trace->proc~code_to_string

Source Code

   subroutine error_fatal(self, unit)
      !! Print the error trace and stop the program
      !! Use for unrecoverable errors
      !!
      !! Usage:
      !!   if (err%has_error()) call err%fatal()
      class(error_t), intent(in) :: self
      integer(default_int), intent(in), optional :: unit

      if (.not. self%has_error()) return

      call self%print_trace(unit)
      error stop 1
   end subroutine error_fatal