private Object evaluate(List<?> tuple, ExceptionExpression ee) throws ExpressionEvaluationException, BlockedException, TeiidComponentException { String msg = (String) internalEvaluate(ee.getMessage(), tuple); String sqlState = ee.getDefaultSQLState(); if (ee.getSqlState() != null) { sqlState = (String) internalEvaluate(ee.getSqlState(), tuple); } Integer errorCode = null; if (ee.getErrorCode() != null) { errorCode = (Integer) internalEvaluate(ee.getErrorCode(), tuple); } Exception parent = null; if (ee.getParent() != null) { parent = (Exception) internalEvaluate(ee.getParent(), tuple); } Exception result = new TeiidSQLException(parent, msg, sqlState, errorCode!=null?errorCode:0); result.setStackTrace(SourceWarning.EMPTY_STACK_TRACE); return result; }
private Object evaluate(List<?> tuple, ExceptionExpression ee) throws ExpressionEvaluationException, BlockedException, TeiidComponentException { String msg = (String) internalEvaluate(ee.getMessage(), tuple); String sqlState = ee.getDefaultSQLState(); if (ee.getSqlState() != null) { sqlState = (String) internalEvaluate(ee.getSqlState(), tuple); } Integer errorCode = null; if (ee.getErrorCode() != null) { errorCode = (Integer) internalEvaluate(ee.getErrorCode(), tuple); } Exception parent = null; if (ee.getParent() != null) { parent = (Exception) internalEvaluate(ee.getParent(), tuple); } Exception result = new TeiidSQLException(parent, msg, sqlState, errorCode!=null?errorCode:0); result.setStackTrace(SourceWarning.EMPTY_STACK_TRACE); return result; }
private Object evaluate(List<?> tuple, ExceptionExpression ee) throws ExpressionEvaluationException, BlockedException, TeiidComponentException { String msg = (String) internalEvaluate(ee.getMessage(), tuple); String sqlState = ee.getDefaultSQLState(); if (ee.getSqlState() != null) { sqlState = (String) internalEvaluate(ee.getSqlState(), tuple); } Integer errorCode = null; if (ee.getErrorCode() != null) { errorCode = (Integer) internalEvaluate(ee.getErrorCode(), tuple); } Exception parent = null; if (ee.getParent() != null) { parent = (Exception) internalEvaluate(ee.getParent(), tuple); } Exception result = new TeiidSQLException(parent, msg, sqlState, errorCode!=null?errorCode:0); result.setStackTrace(SourceWarning.EMPTY_STACK_TRACE); return result; }