Set an error with code and message Resets the stack trace and cause chain
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(error_t), | intent(inout) | :: | self | |||
| integer(kind=default_int), | intent(in) | :: | code | |||
| character(len=*), | intent(in) | :: | message |
pure subroutine error_set(self, code, message) !! Set an error with code and message !! Resets the stack trace and cause chain class(error_t), intent(inout) :: self integer(default_int), intent(in) :: code character(len=*), intent(in) :: message self%code = code self%message = trim(message) self%stack_depth = 0 self%cause_depth = 0 end subroutine error_set