/** * Creates a BatchStatus and initializes it * based on an exception. * * @param e exception to initialize the status from */ public BatchStatus(ServiceException e) { this(); int code = e.getHttpErrorCodeOverride(); if (code == -1) { code = HttpURLConnection.HTTP_INTERNAL_ERROR; } setCode(code); setReason(e.getMessage()); setContentType(e.getResponseContentType()); setContent(e.getResponseBody()); }
/** * Creates a BatchStatus and initializes it * based on an exception. * * @param e exception to initialize the status from */ public BatchStatus(ServiceException e) { this(); int code = e.getHttpErrorCodeOverride(); if (code == -1) { code = HttpURLConnection.HTTP_INTERNAL_ERROR; } setCode(code); setReason(e.getMessage()); setContentType(e.getResponseContentType()); setContent(e.getResponseBody()); }
/** * Creates a BatchStatus and initializes it * based on an exception. * * @param e exception to initialize the status from */ public BatchStatus(ServiceException e) { this(); int code = e.getHttpErrorCodeOverride(); if (code == -1) { code = HttpURLConnection.HTTP_INTERNAL_ERROR; } setCode(code); setReason(e.getMessage()); setContentType(e.getResponseContentType()); setContent(e.getResponseBody()); }