error_clear Subroutine

private pure subroutine error_clear(self)

Clear the error state, stack trace, and cause chain

Type Bound

error_t

Arguments

Type IntentOptional Attributes Name
class(error_t), intent(inout) :: self

Source Code

   pure subroutine error_clear(self)
      !! Clear the error state, stack trace, and cause chain
      class(error_t), intent(inout) :: self
      self%code = SUCCESS
      self%stack_depth = 0
      self%cause_depth = 0
      if (allocated(self%message)) deallocate (self%message)
   end subroutine error_clear