runtime/__init__.py
changeset 2307 c44692b53736
parent 2270 d9175daf6522
child 2309 d8fb90a2e11f
equal deleted inserted replaced
2306:908471b344ba 2307:c44692b53736
    21     global _PLCObjectSingleton
    21     global _PLCObjectSingleton
    22     if exp is None:
    22     if exp is None:
    23         exp = sys.exc_info()
    23         exp = sys.exc_info()
    24     if _PLCObjectSingleton is not None:
    24     if _PLCObjectSingleton is not None:
    25         _PLCObjectSingleton.LogMessage(0, msg + '\n'.join(traceback.format_exception(*exp)))
    25         _PLCObjectSingleton.LogMessage(0, msg + '\n'.join(traceback.format_exception(*exp)))
    26     else:
    26     print(msg)
    27         print(msg)
    27     traceback.print_exception(*exp)
    28         traceback.print_exception(*exp)
       
    29 
    28 
    30 def CreatePLCObjectSingleton(*args):
    29 def CreatePLCObjectSingleton(*args):
    31     global _PLCObjectSingleton
    30     global _PLCObjectSingleton
    32     _PLCObjectSingleton = PLCObject(*args)
    31     _PLCObjectSingleton = PLCObject(*args)