From 8dbb01ad993a88c6016e993f9dc0fce3c2ab336d Mon Sep 17 00:00:00 2001 From: "jeremy.baker@northwestern.edu" Date: Thu, 9 Nov 2023 10:44:02 -0600 Subject: [PATCH] Feature: Clarify model code versus widget errors It was confusing when plot errors would pop up with the model code error that was the root cause at the bottom. --- app/assets/javascripts/alert-display.coffee | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/alert-display.coffee b/app/assets/javascripts/alert-display.coffee index 31038a00f..c6f58840f 100644 --- a/app/assets/javascripts/alert-display.coffee +++ b/app/assets/javascripts/alert-display.coffee @@ -23,7 +23,7 @@ class AlertDisplay show: (_, title, message, frames) -> if @get('isActive') @set('title', "#{@get('title')} / #{title}") - @set('message', "#{@get('message')}

Next message: #{message}") + @set('message', "#{message}

Next message: #{@get('message')}") else @set('title', title) @set('message', message) @@ -233,6 +233,11 @@ class AlertDisplay message = AlertDisplay.makeCompilerErrorMessage(errors).join('
') if source is 'compile-fatal' @_ractive.set('isDismissable', false) + message = if not @_ractive.get('isActive') then message else + """There was an error compiling the model's code:

+ #{message}

+ The below errors were generated by the widgets, but they may be + caused by the above compilation issues in the model's code.""" @reportError(message) return