runtime/__init__.py
changeset 2583 e172ab28d04e
parent 2327 569d7fbc0bd4
child 2586 b89484560a97
--- a/runtime/__init__.py	Tue Apr 09 09:13:55 2019 +0200
+++ b/runtime/__init__.py	Tue Apr 09 13:05:35 2019 +0200
@@ -30,3 +30,13 @@
     global _PLCObjectSingleton
     from runtime.PLCObject import PLCObject  # noqa # pylint: disable=wrong-import-position
     _PLCObjectSingleton = PLCObject(*args, **kwargs)
+
+
+def default_evaluator(tocall, *args, **kwargs):
+    try:
+        res = (tocall(*args, **kwargs), None)
+    except Exception:
+        res = (None, sys.exc_info())
+    return res
+
+