beautypg.com

BrightSign BrightScript 2 Reference Guide User Manual

Page 34

background image

34

el=GetLastRunCompileError()
if el=invalid then
el=GetLastRunRuntimeError()
if el=&hFC or el=&hE2 then return
'FC==ERR_NORMAL_END, E2=ERR_VALUE_RETURN
print "Runtime Error (line ";ln;"): ";el
stop
else
print "compile error (line ";ln;")"
for each e in el
for each i in e
print i;": ";e[i]
next
next

stop
end if

End Sub

GetLastRunCompileError() As Object

Returns an roList of compile errors, or invalid if no errors. Each list entry is an
roAssociativeArray with the keys: ERRNO, ERRLN, ERRSTR.

GetLastRunRuntimeError() As Integer

Returns an error code result after the last script Run().

These two are normal:

&hFC==ERR_NORMAL_END
&hE2==ERR_VALUE_RETURN