Skip to content

Commit 1a21f3c

Browse files
Apply suggestion from @coderabbitai[bot]
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 57646ce commit 1a21f3c

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

testing/Project/Sources/Classes/ParallelTestRunner.4dm

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,21 @@ Function _runParallel()
3939
// Set up global error handler for the test run
4040
var $previousErrorHandler : Text
4141
$previousErrorHandler:=Method called on error:C704
42-
ON ERR CALL:C155("TestErrorHandler")
4342

4443
// Tests already discovered in run() method
4544
If (This:C1470.testSuites.length=0)
4645
This:C1470._generateReport()
46+
// Restore previous error handler
47+
If ($previousErrorHandler#"")
48+
ON ERR CALL:C155($previousErrorHandler)
49+
Else
50+
ON ERR CALL:C155("")
51+
End if
4752
return
4853
End if
49-
54+
55+
// Install handler only when we have work to do
56+
ON ERR CALL:C155("TestErrorHandler")
5057
This:C1470.results.startTime:=Milliseconds:C459
5158

5259
If (This:C1470.outputFormat="human")

0 commit comments

Comments
 (0)