improved ExceptionFactory