db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joel Rosi-Schwartz <Joel.Rosi-Schwa...@Etish.org>
Subject SQL exception on shutdown
Date Sun, 19 Sep 2004 17:36:47 GMT
It seems that shutting down a database always throws an exception, whether or 
not the shutdown was successful. On success the ERROR code embedded in the 
exception message is "ERROR 08006: Database 'DBNAME' shutdown." This makes it 
difficult, if not impossible, to robustly check if the shutdown was 
successful or not. Yes, a string compare could be done to the beginning of 
the message, but this is fragile if the error message changes. What is the 
value of the exception on success? I think this should changed, if for no 
other reason then throwing an exception on success is really against best 
practises and an anti-pattern to be avoided.

- Joel

View raw message