Bug 65758 - Problem with error function in a "if" statement
Summary: Problem with error function in a "if" statement
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version: 3.5.7.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-14 15:50 UTC by gaelle.faurepinel
Modified: 2013-06-24 09:08 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description gaelle.faurepinel 2013-06-14 15:50:25 UTC
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
Comment 1 Julien Nabet 2013-06-21 22:38:53 UTC
On pc Debian x86-64 with master sources updated today and with 4.0.3 Debian packages, I can reproduce this.
Comment 2 Julien Nabet 2013-06-21 23:22:45 UTC
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
Comment 3 Noel Power 2013-06-24 09:08:33 UTC
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.