public static RuntimeException wrap(final Throwable ex) {
        return new UnauthorizedServiceException(ex, CODE_UNAUTHORIZED_SERVICE, ex.getMessage());
    }
Wrap runtime exception.

@param ex the ex
@return the runtime exception
api/cas-server-core-api-services/src/main/java/org/apereo/cas/services/UnauthorizedServiceException.java