Returns the exception e as an instance of Error. If e is already an Error, it just returns e, otherwise it returns an error with exceptionToString(e).
e
Error
exceptionToString(e)
Returns the exception
eas an instance ofError. Ifeis already anError, it just returnse, otherwise it returns an error withexceptionToString(e).