on exception during a SQL execute, show user the SQL line that caused the exception
This commit is contained in:
parent
17a8ece5c1
commit
dfd91d35af
|
@ -2446,7 +2446,15 @@ class sqlThread(threading.Thread):
|
|||
parameters = shared.sqlSubmitQueue.get()
|
||||
#print 'item', item
|
||||
#print 'parameters', parameters
|
||||
self.cur.execute(item, parameters)
|
||||
try:
|
||||
self.cur.execute(item, parameters)
|
||||
except Exception, err:
|
||||
shared.printLock.acquire()
|
||||
sys.stderr.write('\nMajor error occurred when trying to execute a SQL statement within the sqlThread. Please tell Atheros about this error message or post it in the forum! Error occurred while trying to execute statement: "'+str(item) + '" Here are the parameters; you might want to censor this data with asterisks (***) as it can contain private information: '+str(repr(parameters))+'\nHere is the actual error message thrown by the sqlThread: '+ str(err)+'\n')
|
||||
sys.stderr.write('This program shall now abruptly exit!\n')
|
||||
shared.printLock.release()
|
||||
os._exit(0)
|
||||
|
||||
shared.sqlReturnQueue.put(self.cur.fetchall())
|
||||
#shared.sqlSubmitQueue.task_done()
|
||||
|
||||
|
|
|
@ -230,9 +230,6 @@ class MyForm(QtGui.QMainWindow):
|
|||
if isEnabled:
|
||||
status,addressVersionNumber,streamNumber,hash = decodeAddress(addressInKeysFile)
|
||||
|
||||
#self.sqlLookup = sqlThread()
|
||||
#self.sqlLookup.start()
|
||||
|
||||
self.ui.tableWidgetSent.keyPressEvent = self.tableWidgetSentKeyPressEvent
|
||||
font = QFont()
|
||||
font.setBold(True)
|
||||
|
|
Reference in New Issue
Block a user