private void ShowRuntimeError(RuntimeException error) { _runtimeError = error; lnkShowErrLocation.Enabled = _runtimeError != null; lnkShowErrStack.Enabled = lnkShowErrLocation.Enabled; if (_runtimeError != null) { //the exception was caught and processed by Interpreter WriteOutput("Error: " + error.Message + " At " + _runtimeError.Location.ToUiString() + "."); ShowSourceLocation(_runtimeError.Location, 1); } else { //the exception was not caught by interpreter/AST node. Show full exception info WriteOutput("Error: " + error.Message); fmShowException.ShowException(error); } tabBottom.SelectedTab = pageOutput; }
private void ClearRuntimeInfo() { lnkShowErrLocation.Enabled = false; lnkShowErrStack.Enabled = false; _runtimeError = null; txtOutput.Text = string.Empty; }