Exemplo n.º 1
0
        public virtual CompiledScript Compile()
        {
#if DEBUG
            return(_InternalCompile());
#else
            try
            {
                return(_InternalCompile());
            }
            catch (CompilationException e)
            {
                throw _cdata.CreateException(e.Message);
            }
            catch (RuntimeException e)
            {
                throw e;
            }
            catch (Exception e)
            {
                throw _cdata.CreateException(e.Message);
            }
#endif
        }
Exemplo n.º 2
0
 public object Invoke()
 {
     if (_cdata._contextInterface == null)
     {
         throw new Exception("CCL requires a context object");
     }
     try
     {
         return(_function());
     }
     catch (Exception e)
     {
         throw _cdata.CreateException(e.Message);
     }
 }