Skip to content

Commit

Permalink
Simplifies error notification
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeAtHPI committed Dec 6, 2023
1 parent 165354e commit eae4e4e
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions packages/Sandblocks-Babylonian/SBLiveView.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -173,25 +173,19 @@ SBLiveView >> rebuildButtonIn: aContainer applying: aPermutation [
{ #category : #actions }
SBLiveView >> reportError: anError [

reportedError ifNotNil: [
errorIcon ifNotNil: #delete.
errorIcon := nil.
reportedError := nil.].
reportedError := anError.
reportedError ifNotNil: [errorIcon delete. errorIcon := nil. reportedError := nil].

"reportedError := self multiverse sandblockEditor
reportedError := self multiverse sandblockEditor
reportError: anError
process: ((Process forContext: anError signalerContext copyStack priority: Processor activeProcess priority)
shouldResumeFromDebugger: false;
yourself)
source: self."
errorIcon ifNil: [
self block firstSubmorph addMorphBack: (errorIcon := SBIcon iconFlash
large;
color: (Color r: 1 g: 0.6 b: 0.0))].
source: self.

self block firstSubmorph addMorphBack: (errorIcon := SBIcon iconFlash).

(SBSmallError findOpenContextFrom: anError signalerContext in: self multiverse sandblockEditor)
ifNotNil: [:b | b attachDecorator: (errorDecorator := SBErrorDecorator new message: anError asString; subtle: true; yourself)].
ifNotNil: [:b | b attachDecorator: (errorDecorator := SBErrorDecorator new message: anError asString; subtle: false; yourself)].

]

Expand Down

0 comments on commit eae4e4e

Please sign in to comment.