/** * Copy Constructor * @param e */ public LensException(LensException e) { this(e.getMessage(), e.getErrorInfo(), e.getCause(), e.errorMsgFormattingArgs); }
@Override public int compareTo(LensException e) { return this.getErrorWeight() - e.getErrorWeight(); } }
public static LensException wrap(Exception e) { if (e instanceof LensException) { return (LensException) e; } return new LensException(e); }
private LensException handleHiveSQLException(HiveSQLException ex) throws LensException { if (ex.getMessage().contains("SemanticException")) { throw new LensException(SEMANTIC_ERROR.getLensErrorInfo(), ex, ex.getMessage()); } throw new LensException(DRIVER_ERROR.getLensErrorInfo(), ex, ex.getMessage()); }
private LensErrorTO buildLensErrorTO(final ErrorCollection errorCollection, final LensError lensError) { formattedErrorMsg = getFormattedErrorMsg(lensError); final String stackTrace = getStackTraceString(); return buildLensErrorTO(errorCollection, formattedErrorMsg, stackTrace); }
protected List<LensErrorTO> getChildErrors(final ErrorCollection errorCollection) { List<LensErrorTO> childErrors = new LinkedList<LensErrorTO>(); for (LensException cause : getCauses()) { childErrors.add(cause.buildLensErrorTO(errorCollection)); } return childErrors; } }
/** * Check started. * * @throws LensException the lens exception */ public void checkStarted() throws LensException { if (!isStarted) { throw new LensException("Spark driver is not started yet"); } }
/** * Copy Constructor * @param e */ public LensException(LensException e) { this(e.getMessage(), e.getErrorInfo(), e.getCause(), e.errorMsgFormattingArgs); }
private LensException handleHiveSQLException(HiveSQLException ex) throws LensException { if (ex.getMessage().contains("SemanticException")) { throw new LensException(SEMANTIC_ERROR.getLensErrorInfo(), ex, ex.getMessage()); } throw new LensException(DRIVER_ERROR.getLensErrorInfo(), ex, ex.getMessage()); }
private LensErrorTO buildLensErrorTO(final ErrorCollection errorCollection, final LensError lensError) { formattedErrorMsg = getFormattedErrorMsg(lensError); final String stackTrace = getStackTraceString(); return buildLensErrorTO(errorCollection, formattedErrorMsg, stackTrace); }
protected List<LensErrorTO> getChildErrors(final ErrorCollection errorCollection) { List<LensErrorTO> childErrors = new LinkedList<LensErrorTO>(); for (LensException cause : getCauses()) { childErrors.add(cause.buildLensErrorTO(errorCollection)); } return childErrors; } }
@Override public int compareTo(LensException e) { return this.getErrorWeight() - e.getErrorWeight(); } }
/** * Clones this candidate * @return the clone * @throws LensException propagated exception */ default Candidate copy() throws LensException { throw new LensException("Candidate " + this + " doesn't support copy"); }
public static LensException wrap(Exception e) { if (e instanceof LensException) { return (LensException) e; } return new LensException(e); }
/** * Clones this candidate * @return the clone * @throws LensException propagated exception */ default Candidate copy() throws LensException { throw new LensException("Candidate " + this + " doesn't support copy"); }
private LensConfConstants() throws LensException { throw new LensException("Can't instantiate LensConfConstants"); }
private LensConfConstants() throws LensException { throw new LensException("Can't instantiate LensConfConstants"); }
@Override public void preDriverRun(HiveDriverRunHookContext arg0) throws Exception { throw new LensException("Failing this run"); }
public DriverQueryPlan explain(AbstractQueryContext explainCtx) throws LensException { throw new LensException("failing!"); } }
@Override public QueryCost estimate(AbstractQueryContext qctx) throws LensException { throw new LensException("failing!"); }