The following code snippet seems to suggest a bug in Try Catch
handling when accessing a collection's Item property with an invalid
index argument.
Can someone confirm as a bug or explain it to me? The help file is
making me confused.
I was under the impression the try catch ALWAYS has priority over any
class' Error Method handler..
clear
x = CREATEOBJECT("test")
x.method1()
x.method2()
DEFINE CLASS test as Collection
FUNCTION Error(nError, cMethod, nLine)
?"class error handler fired!"
ENDFUNC
FUNCTION Method1
LOCAL y
y=-1
?"Method1"
TRY
y = MissingVariable
CATCH
?"Method1 - Catch Block Fired"
?""
y = 0
ENDTRY
ENDFUNC
FUNCTION Method2
LOCAL y
y=-1
?"Method2"
TRY
y = THIS.Item(1)
CATCH
?"Method2 - Catch Block Fired"
?""
y = 0
ENDTRY
ENDFUNC
ENDDEFINE02
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message:
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.