Converts an exception to an ErrorInfo object.
the standardized error information
the exception to convert