diff --git a/Bonsai.Editor/EditorForm.cs b/Bonsai.Editor/EditorForm.cs index bf12a9e4..573c6642 100644 --- a/Bonsai.Editor/EditorForm.cs +++ b/Bonsai.Editor/EditorForm.cs @@ -1407,6 +1407,7 @@ bool HandleSchedulerError(Exception e) void HandleWorkflowError(Exception e) { + var building = this.building; // Ensure the current value of `building` is used when if the handler below is invoked Action selectExceptionNode = () => { var workflowException = e as WorkflowException; @@ -1415,7 +1416,7 @@ void HandleWorkflowError(Exception e) workflowError = workflowException; HighlightExceptionBuilderNode(workflowException, building); } - else editorSite.ShowError(e.Message, Name); + else editorSite.ShowError(e.Message, "Internal workflow error"); }; if (InvokeRequired) BeginInvoke(selectExceptionNode);