コード例 #1
0
 public void Interpret(PrefabSingleInterpretArgs args)
 {
     try
     {
         if (_interpretFunc != null)
         {
             _scope.Engine.Operations.Invoke(_interpretFunc, args);
         }
     }
     catch (Exception e)
     {
         throw PythonScriptHost.Instance.GetFormattedException(e, Name);
     }
 }
コード例 #2
0
ファイル: PrefabSingleLogic.cs プロジェクト: nunb/code
        public Tree Interpret(Tree frame)
        {
            if (_interpreter != null)
            {
                Tree        tree               = LayerChain.InterpretChain(_layers, frame);
                MutableTree mutable            = MutableTree.FromTree(tree);
                PrefabSingleInterpretArgs args = new PrefabSingleInterpretArgs(mutable, Storage);

                try
                {
                    _interpreter.Interpret(args);
                }
                catch (Exception e)
                {
                    mutable["interpretation_exception"] = e;
                }

                return(Tree.FromMutable(mutable));
            }

            return(frame);
        }
コード例 #3
0
ファイル: PythonSingleLayer.cs プロジェクト: prefab/code
        public void Interpret(PrefabSingleInterpretArgs args)
        {
            try
            {

                if (_interpretFunc != null)
                {
                    _scope.Engine.Operations.Invoke(_interpretFunc, args);
                }

            }
            catch(Exception e)
            {
                throw PythonScriptHost.Instance.GetFormattedException(e, Name);
            }
        }
コード例 #4
0
ファイル: PrefabSingleLogic.cs プロジェクト: prefab/code
        public Tree Interpret(Tree frame)
        {
            if (_interpreter != null)
            {
                Tree tree = LayerChain.InterpretChain(_layers, frame);
                MutableTree mutable = MutableTree.FromTree(tree);
                PrefabSingleInterpretArgs args = new PrefabSingleInterpretArgs(mutable, Storage);

                try
                {
                    _interpreter.Interpret(args);
                }
                catch (Exception e)
                {

                    mutable["interpretation_exception"] = e;
                }

                return Tree.FromMutable(mutable);
            }

            return frame;
        }