I am using a function to get a default database so I do not have to
work with configuration files. Something like:
proc ::dcblUtilities::getDefaultDB {{key ""} {DB db} {timeoutSecs 10} \
{configDB ~/.tcl.sqlite}} {
When the key is empty, I use the scriptname as key.
When no key can be retrieved, I give an error:
error "Cannot retrieve database for ${key}"
But what is the tcl way when something goes wrong with opening the
database(s): let the error propagate, or catching the error and
throwing my own error?
--
Cecil Westerhof
Senior Software Engineer
LinkedIn:
http://www.linkedin.com/in/cecilwesterhof