' Gambas test file Public Sub Error() Dim a As Long Try a = 3 / 0 Assert.Error("Wanted error. Ok if ok.") Try a = 3 / 0 ' Throws Error.Code 26 Assert.ErrorCode(26, "Wanted error 26. Ok if ok.") End