Test.BailOut() now raises an error to quit later, instead of quitting immediately, to avoid circular references warning.

[GB.TEST]
* NEW: Test.BailOut() now raises an error to quit later, instead of quitting immediately, to avoid circular references warning.
This commit is contained in:
gambas 2021-03-05 19:36:14 +01:00 committed by Christof Thalhofer
parent 7fa5049110
commit 1656bfa06c
2 changed files with 3 additions and 2 deletions

View file

@ -331,7 +331,7 @@ End
Public Sub BailOut(Optional Comment As String)
$hPrinter.BailOut(Comment)
Quit 1
Error.Raise("Bailout!")
End

View file

@ -46,7 +46,8 @@ Public Sub Run()
Endif
Catch
Test.BailOut("Test Stopped with error \"" & Error.Text & "\" caused by " & CurrentAction & " in " & Error.Where & ".")
If Error.Where Begins "Test.BailOut." Then Quit 1
Test.BailOut("Test stopped with error \"" & Error.Text & "\" caused by " & CurrentAction & " in " & Error.Where & ".")
End Sub