コード例 #1
0
        public Rooted <JS.Value> Get()
        {
            var root = new Rooted <JS.Value>(Context, JS.Value.Undefined);

            if (JSAPI.GetPendingException(Context, root))
            {
                return(root);
            }

            root.Dispose();
            return(null);
        }
コード例 #2
0
        public Exception GetManaged()
        {
            var root = new Rooted <JS.Value>(Context, JS.Value.Undefined);

            if (!JSAPI.GetPendingException(Context, root))
            {
                return(null);
            }

            var error = new Spidermonkey.Managed.JSError(Context, root.Value.AsObject);

            return(error.ToException());
        }