public class ApiUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static RestApiException |
asRestApiException(java.lang.String msg,
java.lang.Exception e)
Convert an exception encountered during API execution to a
RestApiException . |
public static RestApiException asRestApiException(java.lang.String msg, java.lang.Exception e) throws java.lang.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
.java.lang.RuntimeException
- if e
is a runtime exception, it is rethrown as-is.