@Test public void testExceptionGroup() { Block b1 = sample1(); Block b2 = b1.clone(); b1.setExceptionGroup("x"); b2.setExceptionGroup("y"); assertFalse(b1.equals(b2)); }
@Test public void testBlockExceptionHandling() throws ParseException { CommandStatement cmdStmt = new CommandStatement(new Query(new Select(Arrays.asList(new MultipleElementSymbol())), new From(Arrays.asList(new UnaryFromClause(new GroupSymbol("x")))), null, null, null)); AssignmentStatement assigStmt = new AssignmentStatement(new ElementSymbol("a"), new Constant(new Integer(1))); //$NON-NLS-1$ RaiseStatement errStmt = new RaiseStatement(new Constant("My Error")); //$NON-NLS-1$ Block b = new Block(); b.setExceptionGroup("e"); b.addStatement(cmdStmt); b.addStatement(assigStmt); b.addStatement(errStmt, true); helpStmtTest("BEGIN\nselect * from x;\na = 1;\nexception e\nERROR 'My Error';\nEND", "BEGIN\nSELECT * FROM x;\na = 1;\nEXCEPTION e\nRAISE SQLEXCEPTION 'My Error';\nEND", b); //$NON-NLS-1$ }
jj_consume_token(EXCEPTION); eId = id(Boolean.FALSE); block.setExceptionGroup(eId); label_4: while (true) {
jj_consume_token(EXCEPTION); eId = id(Boolean.FALSE); block.setExceptionGroup(eId); label_4: while (true) {
jj_consume_token(EXCEPTION); eId = id(Boolean.FALSE); block.setExceptionGroup(eId); label_4: while (true) {