final public RaiseStatement errorStatement(ParseInfo info) throws ParseException { Expression errMsg = null; jj_consume_token(ERROR); errMsg = expression(info); ExceptionExpression ee = new ExceptionExpression(); ee.setMessage(errMsg); {if (true) return new RaiseStatement(ee);} throw new Error("Missing return statement in function"); }
final public RaiseStatement errorStatement(ParseInfo info) throws ParseException { Expression errMsg = null; jj_consume_token(ERROR); errMsg = expression(info); ExceptionExpression ee = new ExceptionExpression(); ee.setMessage(errMsg); {if (true) return new RaiseStatement(ee);} throw new Error("Missing return statement in function"); }
final public RaiseStatement errorStatement(ParseInfo info) throws ParseException { Expression errMsg = null; jj_consume_token(ERROR); errMsg = expression(info); ExceptionExpression ee = new ExceptionExpression(); ee.setMessage(errMsg); {if (true) return new RaiseStatement(ee);} throw new Error("Missing return statement in function"); }
@Override public ExceptionExpression clone() { ExceptionExpression clone = new ExceptionExpression(); if (this.message != null) { clone.message = (Expression) this.message.clone(); } if (this.sqlState != null) { clone.sqlState = (Expression) this.sqlState.clone(); } if (this.errorCode != null) { clone.errorCode = (Expression) this.errorCode.clone(); } if (this.parent != null) { clone.parent = (Expression) this.parent.clone(); } return clone; }
@Override public ExceptionExpression clone() { ExceptionExpression clone = new ExceptionExpression(); if (this.message != null) { clone.message = (Expression) this.message.clone(); } if (this.sqlState != null) { clone.sqlState = (Expression) this.sqlState.clone(); } if (this.errorCode != null) { clone.errorCode = (Expression) this.errorCode.clone(); } if (this.parent != null) { clone.parent = (Expression) this.parent.clone(); } return clone; }
@Override public ExceptionExpression clone() { ExceptionExpression clone = new ExceptionExpression(); if (this.message != null) { clone.message = (Expression) this.message.clone(); } if (this.sqlState != null) { clone.sqlState = (Expression) this.sqlState.clone(); } if (this.errorCode != null) { clone.errorCode = (Expression) this.errorCode.clone(); } if (this.parent != null) { clone.parent = (Expression) this.parent.clone(); } return clone; }
@Test public void testErrorStatement() throws Exception { ExceptionExpression ee = new ExceptionExpression(); ee.setMessage(new Constant("Test only")); RaiseStatement errStmt = new RaiseStatement(ee); helpStmtTest("ERROR 'Test only';", "RAISE SQLEXCEPTION 'Test only';", //$NON-NLS-1$ //$NON-NLS-2$ errStmt); }
ExceptionExpression ee = new ExceptionExpression(); ee.setMessage(err); ee.setSqlState(sqlState);
ExceptionExpression ee = new ExceptionExpression(); ee.setMessage(err); ee.setSqlState(sqlState);
ExceptionExpression ee = new ExceptionExpression(); ee.setMessage(err); ee.setSqlState(sqlState);
@Test public void testRaiseErrorStatement() throws Exception { ExceptionExpression ee = new ExceptionExpression(); ee.setMessage(new Constant("Test only")); ee.setSqlState(new Constant("100")); ee.setParent(new ElementSymbol("e")); RaiseStatement errStmt = new RaiseStatement(ee, true); helpStmtTest("RAISE SQLWARNING SQLEXCEPTION 'Test only' SQLSTATE '100' chain e;", "RAISE SQLWARNING SQLEXCEPTION 'Test only' SQLSTATE '100' CHAIN e;", //$NON-NLS-1$ //$NON-NLS-2$ errStmt); }