Esempio n. 1
0
        /// <summary>
        /// Evaluates J scripts
        /// </summary>
        /// <param name="command">J script to evaluate</param>
        public void Eval(string command)
        {
            try
            {
                int result;

                // Execute the command
                result = jObject.Do(command);

                if (result > 0)
                {
                    // Throw the correct error message
                    object errorMessage;
                    jObject.ErrorTextB(result, out errorMessage);
                    Exception eoe = new Exception(Convert.ToString(errorMessage));
                    throw eoe;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }