Skip to content

Instantly share code, notes, and snippets.

@krisrice
Created February 4, 2016 21:35
Show Gist options
  • Save krisrice/eb2cf51d6533d188b0e4 to your computer and use it in GitHub Desktop.
Save krisrice/eb2cf51d6533d188b0e4 to your computer and use it in GitHub Desktop.
try {
var first = util.executeReturnOneCol("select 1 from dualx");
ctx.write('\n\n FIRST: ' + first + '\n\n');
} catch (e ) {
ctx.write('\n\n ERROR' + e + '\n\n');
}
sqlcl.setStmt('select X from YZ');
sqlcl.run();
var err = ctx.getProperty("sqldev.error");
var errMsg = ctx.getProperty("sqldev.last.err.message");
var errCode = ctx.getProperty("sqldev.last.err.message.forsqlcode");
ctx.write("\n*\nERROR:" + err + "\n*\n");
ctx.write("\n***\nERROR :" + errCode + "\n***\n");
ctx.write("\n****\nERROR Message:" + errMsg + "\n****\n");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment