improve debug output if polling loop crashes
Change-Id: Ia5f6f02542720701f5e64574254252ac7d5e5482 Reviewed-on: https://forge.frm2.tum.de/review/18481 Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de> Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de> Tested-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
This commit is contained in:
@@ -28,9 +28,10 @@ from __future__ import print_function
|
|||||||
# all others MUST derive from those, the 'interface'-class is still derived
|
# all others MUST derive from those, the 'interface'-class is still derived
|
||||||
# from these base classes (how to do this?)
|
# from these base classes (how to do this?)
|
||||||
|
|
||||||
|
import sys
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from secop.lib import formatExtendedStack, mkthread, unset_value
|
from secop.lib import formatExtendedStack, mkthread, unset_value, formatException
|
||||||
from secop.lib.enum import Enum
|
from secop.lib.enum import Enum
|
||||||
from secop.errors import ConfigError
|
from secop.errors import ConfigError
|
||||||
from secop.datatypes import EnumType, TupleOf, StringType, FloatRange, get_datatype
|
from secop.datatypes import EnumType, TupleOf, StringType, FloatRange, get_datatype
|
||||||
@@ -238,7 +239,8 @@ class Readable(Module):
|
|||||||
self.log.exception(e)
|
self.log.exception(e)
|
||||||
self.status = (self.Status.ERROR, 'polling thread could not start')
|
self.status = (self.Status.ERROR, 'polling thread could not start')
|
||||||
started_callback(self)
|
started_callback(self)
|
||||||
print(formatExtendedStack())
|
print(formatException(0, sys.exc_info(), verbose=True))
|
||||||
|
time.sleep(10)
|
||||||
|
|
||||||
def __pollThread_inner(self, started_callback):
|
def __pollThread_inner(self, started_callback):
|
||||||
"""super simple and super stupid per-module polling thread"""
|
"""super simple and super stupid per-module polling thread"""
|
||||||
|
|||||||
Reference in New Issue
Block a user