db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anna Krajewska <am.krajew...@gmail.com>
Subject get SQLState from ij.runScript
Date Thu, 12 Apr 2012 09:56:59 GMT
Hi

Is there an elegant way in which I can get sqlState of the exception
occured while running ij.runScript? I get an output which looks like
command line history, the sqlState is present there but I can only get
it by parsing the string (finding the word "ERROR", then adding 1 for
the empty character and taking whatever is next as sqlState). And if
there isn't - can I assume that the format of the message will always
be like this (line starting with ERROR, whitespace, sqlstate, colon):

ij>my derby instruction
ERROR <SqlState>:

?

I need that because there is no "create or replace view" in derby. I
need to ignore X0Y32 error: object already exists,  when I run my
scripts from java.

Regards,
Anna

Mime
View raw message