public void Run(string coreCodePath, string filePath = null)
{
try
{
LoadAndExecute(coreCodePath);
}
catch(Exception e)
{
if (!(e is InterpreterException))
throw new InterpreterException("Cannot load core library", e);
throw;
}
Func<object> func = () =>
{
if (filePath != null)
LoadAndExecute(filePath);
return null;
};
InterpreterHelper.ActAndHandleException(func);
}