Try not catching SQL Table Missing Error

Hi,
I'm running a series of named queries using scripting. I've put try-except statements around most of my named queries, but it doesn't appear to be catching the error from the actual named query e.g. Table is missing or Database is offline

	if C1_Database == True:
		print "Secondary Database Write Attempt"
		try:
			Write_Return = system.db.execQuery(Path,Parameters)
			print "Secondary Write Success"
		except Exception as error:
			print str(error)

It does catch errors like wrong path or wrong parameters

First, you should use system.db.execUpdate for an insert/update, not execQuery.

Second, you can try catching the java exception with something like this:

from java.lang import Throwable

try:
    Write_Return = system.db.execUpdate(Path, Parameters)
    print "Secondary Write Success"
except Throwable, error:
    system.util.getLogger("Database").error("Named query failed", error)