public class ApiUtil extends Object
Modifier and Type | Method and Description |
---|---|
static RestApiException |
asRestApiException(String msg,
Exception e)
Convert an exception encountered during API execution to a
RestApiException . |
public static RestApiException asRestApiException(String msg, Exception e) throws RuntimeException
RestApiException
.msg
- message to be used in the case where a new RestApiException
is wrapped
around e
.e
- exception being handled.e
if it is already a RestApiException
, otherwise a new RestApiException
wrapped around e
.RuntimeException
- if e
is a runtime exception, it is rethrown as-is.