changeset 2584 | adfdeaba5a6a |
parent 2583 | e172ab28d04e |
child 2586 | b89484560a97 |
--- a/runtime/__init__.py Sun Apr 07 21:08:07 2019 +0200 +++ b/runtime/__init__.py Tue Apr 09 13:08:03 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 + +