Strategy interface responsible for converting an instance of
Exception to appropriate instance of ErrorCode.
Implementations of this interface should be accessed indirectly through
the ErrorCodes's factory method.
Determines whether this implementation can handle the given exception or not.
Calling the toErrorCode(Exception) when this method returns
false, is strongly discouraged.
参数:
exception - The exception to examine
返回:
true if the implementation can handle the exception, false otherwise.