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

Reply via email to