Skip to content

Commit

Permalink
Use the evaluation result also when handling errors [feenkcom/gtoolki…
Browse files Browse the repository at this point in the history
  • Loading branch information
chisandrei committed Aug 20, 2024
1 parent 7337af7 commit d87666b
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/GToolkit-GemStone-Pharo/GtRsrEvaluatorPromise.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -141,21 +141,22 @@ GtRsrEvaluatorPromise >> setPromise: aPromise strategy: aSymbol session: aSessio
{ #category : #accessing }
GtRsrEvaluatorPromise >> signalGemStoneDebugger [
<gemstoneDebuggerSignal>
| exception result |
| exception rawEvaluationResultData evaluationResult |

self isGtEvaluationException ifFalse:
[ self error: 'not a gs exception' ].
self isGtEvaluationException ifFalse: [
self error: 'not a gs exception' ].

result := rsrPromise value.
result gtPharoProxyInitializeWithSession: gtSession.
rawEvaluationResultData := rsrPromise value.
evaluationResult := self createEvaluationResultFromData: rawEvaluationResultData.
evaluationResult gtPharoProxyInitializeWithSession: gtSession.

exception := GtRsrEvaluationException new
debuggerProxy: result.
debuggerProxy: evaluationResult evaluationContext.
exception signal.

^ exception hasDebugResult
ifTrue: [ exception debugResult ]
ifFalse: [ result ]
ifFalse: [ rawEvaluationResultData ]
]

{ #category : #accessing }
Expand Down

0 comments on commit d87666b

Please sign in to comment.