Better exceptions handling

This commit is contained in:
Ivan Kravets committed 2015-11-26 22:02:59 +02:00
1 parent 25f57cc683
commit ed32e07e34
8 files changed
+37 -31

No files matched your search

+4 -1
View File
@@ -291,7 +291,10 @@ def on_exception(e):
return
mp = MeasurementProtocol()
mp['exd'] = "%s: %s" % (type(e).__name__, e)
mp['exf'] = int(not isinstance(e, exception.PlatformioException))
mp['exf'] = int(any([
not isinstance(e, exception.PlatformioException),
"Error" in e.__class__.__name__
]))
mp.send("exception")