BrightSign BrightScript 3.0 Reference Manual User Manual
Page 55

50
Print Run("test2.brs", "arg 1", "arg 2")
if Run(["file1.brs","file2.brs"])<>4 then stop
BreakIfRunError(LINE_NUM)
stop
End Sub
Sub BreakIfRunError(ln)
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]
end for
end for
stop
end if
End Sub