protected List<LensErrorTO> getChildErrors(final ErrorCollection errorCollection) { List<LensErrorTO> childErrors = new LinkedList<LensErrorTO>(); for (LensException cause : getCauses()) { childErrors.add(cause.buildLensErrorTO(errorCollection)); } return childErrors; } }
protected List<LensErrorTO> getChildErrors(final ErrorCollection errorCollection) { List<LensErrorTO> childErrors = new LinkedList<LensErrorTO>(); for (LensException cause : getCauses()) { childErrors.add(cause.buildLensErrorTO(errorCollection)); } return childErrors; } }
private LensErrorTO buildLensErrorTO(final ErrorCollection errorCollection, final LensError lensError) { formattedErrorMsg = getFormattedErrorMsg(lensError); final String stackTrace = getStackTraceString(); return buildLensErrorTO(errorCollection, formattedErrorMsg, stackTrace); }
public static LensException processLensException(LensException exc) { if (exc != null) { exc.buildLensErrorTO(get().getErrorCollection()); } return exc; }
private LensErrorTO buildLensErrorTO(final ErrorCollection errorCollection, final LensError lensError) { formattedErrorMsg = getFormattedErrorMsg(lensError); final String stackTrace = getStackTraceString(); return buildLensErrorTO(errorCollection, formattedErrorMsg, stackTrace); }
public final LensErrorTO buildLensErrorTO(final ErrorCollection errorCollection) { final LensError lensError = errorCollection.getLensError(getErrorCode()); return buildLensErrorTO(errorCollection, lensError); }
public final LensErrorTO buildLensErrorTO(final ErrorCollection errorCollection) { final LensError lensError = errorCollection.getLensError(getErrorCode()); return buildLensErrorTO(errorCollection, lensError); }
public final void buildLensErrorResponse(final ErrorCollection errorCollection, final String apiVersion, final String id) { final LensError lensError = errorCollection.getLensError(getErrorCode()); final LensErrorTO lensErrorTO = buildLensErrorTO(errorCollection, lensError); lensAPIResult = LensAPIResult.composedOf(apiVersion, id, lensErrorTO, lensError.getHttpStatusCode()); }
public final void buildLensErrorResponse(final ErrorCollection errorCollection, final String apiVersion, final String id) { final LensError lensError = errorCollection.getLensError(getErrorCode()); final LensErrorTO lensErrorTO = buildLensErrorTO(errorCollection, lensError); lensAPIResult = LensAPIResult.composedOf(apiVersion, id, lensErrorTO, lensError.getHttpStatusCode()); }
/** * Sets the failed status. * * @param ctx the ctx * @param statusMsg the status msg * @param e the LensException * @throws LensException the lens exception */ void setFailedStatus(QueryContext ctx, String statusMsg, Exception e) throws LensException { QueryStatus before = ctx.getStatus(); ctx.setStatus(new QueryStatus(0.0f, null, FAILING, statusMsg, false, null, LensUtil.getCauseMessage(e), e instanceof LensException ? ((LensException)e).buildLensErrorTO(this.errorCollection) : null)); handleRetries(ctx); if (ctx.finished()) { updateFinishedQuery(ctx, before); } fireStatusChangeEvent(ctx, ctx.getStatus(), before); }