toDefault

Converts this ErrorInfo to a DefaultErrorInfo instance.

If the current instance is already a DefaultErrorInfo, returns it directly. Otherwise, creates a new DefaultErrorInfo with the same properties. This is useful when you need the concrete implementation for specific operations.

Receiver

The ErrorInfo instance to convert

Return

A DefaultErrorInfo instance with the same error details