When the "error" function is in a "if" statement, it is never triggered. Example : In this case, the routine launchs an error : Sub Main Dim isErreur as Boolean isErreur = 1 MsgBox "Essai lancement erreur." error(9) MsgBox "Lancement loupé." End Sub In this case, it doesn't : Sub Main Dim isErreur as Boolean isErreur = 1 if isErreur then MsgBox "Essai lancement erreur." error(9) MsgBox "Lancement loupé." end if End Sub
On pc Debian x86-64 with master sources updated today and with 4.0.3 Debian packages, I can reproduce this.
Noel: one for you? Indeed, when "if" is used, "SbiRuntime::StepERROR()" from basic/source/runtime/runtime.cxx isn't called. I added a trace in SbiRuntime::Step() for eOp Situation OK: Until first MsgBox: 135 135 137 135 129 128 30 135 24 65 25 128 After: 28 135 66 53 Situation KO: Until first MsgBox 135 135 137 135 129 128 30 135 129 71 135 24 65 25 128 After: 28 135 24 66 25 128 28 135 24 65 25 128
sounds like a bug ( and was there in 3.4 afaict )
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.