Improve handling for exceptions, output more information so we can find and fix problems.
This commit is contained in:
@@ -73,13 +73,15 @@ class ShipBrowserWorkerThread(threading.Thread):
|
||||
cache[id_] = set_
|
||||
|
||||
wx.CallAfter(callback, (id_, set_))
|
||||
except:
|
||||
pyfalog.debug("Callback failed.")
|
||||
except Exception as e:
|
||||
pyfalog.critical("Callback failed.")
|
||||
pyfalog.critical(e)
|
||||
finally:
|
||||
try:
|
||||
queue.task_done()
|
||||
except:
|
||||
pyfalog.debug("Queue task done failed.")
|
||||
except Exception as e:
|
||||
pyfalog.critical("Queue task done failed.")
|
||||
pyfalog.critical(e)
|
||||
|
||||
|
||||
class PriceWorkerThread(threading.Thread):
|
||||
@@ -835,8 +837,9 @@ class Market(object):
|
||||
def cb():
|
||||
try:
|
||||
callback(requests)
|
||||
except Exception:
|
||||
pyfalog.debug("Callback failed.")
|
||||
except Exception as e:
|
||||
pyfalog.critical("Callback failed.")
|
||||
pyfalog.critical(e)
|
||||
eos.db.commit()
|
||||
|
||||
self.priceWorkerThread.trigger(requests, cb)
|
||||
@@ -851,8 +854,9 @@ class Market(object):
|
||||
def cb():
|
||||
try:
|
||||
callback(item)
|
||||
except:
|
||||
pyfalog.debug("Callback failed.")
|
||||
except Exception as e:
|
||||
pyfalog.critical("Callback failed.")
|
||||
pyfalog.critical(e)
|
||||
|
||||
self.priceWorkerThread.setToWait(item.ID, cb)
|
||||
|
||||
|
||||
@@ -166,8 +166,9 @@ class Port(object):
|
||||
fits += fitsImport
|
||||
except xml.parsers.expat.ExpatError:
|
||||
return False, "Malformed XML in %s" % path
|
||||
except Exception:
|
||||
pyfalog.exception("Unknown exception processing: %s", path)
|
||||
except Exception as e:
|
||||
pyfalog.critical("Unknown exception processing: %s", path)
|
||||
pyfalog.critical(e)
|
||||
return False, "Unknown Error while processing %s" % path
|
||||
|
||||
IDs = []
|
||||
|
||||
Reference in New Issue
Block a user