void Run(string code, bool useTry)
{
if (!builded)
{
Log_Error("Build 失败无法运行");
}
CSLE.CLS_Content content = env.CreateContent();//创建一个上下文,出错以后可以用此上下文捕获信息
if (useTry)
{
try
{
__Run(code, content);
}
catch (Exception err)
{
string errValue = content.DumpValue();
string errStack = content.DumpStack(null);
string errSystem = "SystemError:\n" + err.ToString();
MessageBox.Show(errValue + errStack + errSystem);
}
}
else
{
__Run(code, content);
}
}