Skip to content

Commit

Permalink
Feature: Clarify model code versus widget errors
Browse files Browse the repository at this point in the history
It was confusing when plot errors would pop up with the model code error
that was the root cause at the bottom.
  • Loading branch information
LaCuneta committed Nov 9, 2023
1 parent be05a23 commit 8dbb01a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/assets/javascripts/alert-display.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class AlertDisplay
show: (_, title, message, frames) ->
if @get('isActive')
@set('title', "#{@get('title')} / #{title}")
@set('message', "#{@get('message')}<br/><br/>Next message: #{message}")
@set('message', "#{message}<br/><br/>Next message: #{@get('message')}")
else
@set('title', title)
@set('message', message)
Expand Down Expand Up @@ -233,6 +233,11 @@ class AlertDisplay
message = AlertDisplay.makeCompilerErrorMessage(errors).join('<br/>')
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:<br/><br/>
#{message}<br/><br/>
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
Expand Down

0 comments on commit 8dbb01a

Please sign in to comment.