protected GitLabApiException handle(Exception thrown) {

        if (thrown instanceof GitLabApiException) {
            return ((GitLabApiException) thrown);
        }

        return (new GitLabApiException(thrown));
    }
protected GitLabApiException handle ( Exception thrown ) { if ( thrown instanceof GitLabApiException ) { return ( ( GitLabApiException ) thrown ) ; } return ( new GitLabApiException ( thrown ) ) ; }
Wraps an exception in a GitLabApiException if needed.

@param thrown the exception that should be wrapped
@return either the untouched GitLabApiException or a new GitLabApiExceptin wrapping a non-GitLabApiException