private Exception ConvertException(ScriptEngineException se)
        {
            dynamic exp = new ExpandoObject();

            exp.message = se.Message;
            var dets = se.ErrorDetails;

            if (dets != null && dets.IndexOf('\n') > 0)
            {
                dets = dets.Substring(dets.IndexOf('\n'));
            }
            exp.stack = dets;
            return(Converter.AsException(exp));
        }