Skip to content

Commit

Permalink
Adding exception handling. Display the error and don't exit
Browse files Browse the repository at this point in the history
  • Loading branch information
glennblock committed May 6, 2013
1 parent 2a462db commit d936c24
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/ScriptCs/Repl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,14 @@ public void Terminate()

public void Execute(string script)
{
_scriptEngine.Execute(script, _references, DefaultNamespaces, _scriptPackSession);
try
{
_scriptEngine.Execute(script, _references, DefaultNamespaces, _scriptPackSession);
}
catch (Exception ex)
{
Console.WriteLine(ex);
}
}
}
}

0 comments on commit d936c24

Please sign in to comment.