Report ID: sbuwicsb
Status: Open
Summary: RBScript: RunTimeError Event Not called
Category: REALbasic / Framework / User Interface / Controls / RBScript

Severity:Incorrect Functionality

Description

I purposely introduced an out of bound exception in an RBScript to see what would happen... I assumed that The RuntimeError event would be called so that I could inform the user of the error and the line it's on so they could fix it...

Instead the event is not called and i get the generic RB unhandled OOB exception Dialog saying the App Must quit.. Which i which is not what I want... and end users writing scripts would not take kindly to that...

IMO it's a BIG BUG for RBscript


I suppose I could add an exception handler to the script itself, but I suspect then i would lose the original line number of the exception, which would not be very helpful to Scriptors who would not be expert RB Coders

IDE Version: REALbasic 2006r2fc4 (actually fc3)

Target and Platform Run on:
Macintosh - OS X 10.4.6 Dual Core 2.3 GHz PowerMac G5 2.5 GB RAM

Steps to Reproduce:
1) New project

2) Drag RBScript Control onto Default window creating RBScript1

3) In RBScript1.RuntimeError Event:
Sub RuntimeError(line As Integer, error As RuntimeException)
MsgBox "RunTime error on line " + str(line)
End Sub

4) In Window1.Open Event
Sub Open()
RbScript1.Source = "Dim I(2) as Integer" + EndOfLine _
+ "I(0) = I(5)"
RbScript1.Run
End Sub

5) Run

Event Not called and i get the standard OOB Exception

Workaround : Not sure of any...

Attachments:
RbscriptExceptionBug.rbp 13.0 kb

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to