Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Re: on Local Error


Message #1 by Larry.Page@T... on Thu, 13 Mar 2003 22:54:54
On Local Error... I think is a little old, something like VB2, now
Local is not a keyword anymore (at least since VB5)
As for your code, the error is not thrown in the compiled version
because in debug.print (at least in this case) is executed only in 
the IDE.

BTW: What was the original question?

Marco

> I was searching for the same answer and this was the best I could come 
up 
w> ith: From http://compilers.iecc.com/comparch/article/01-12-132
"> There are also 'ON LOCAL ERROR GOTO' & 'ON LOCAL ERROR GOTO 0' which
o> nly apply to the current sub or function, and supersede the global
v> ersions."

> Here's the example that started my search.  Interesting in that it only 
t> hrows an error if you are running from within the IDE.

> Public Function IsInIDE() As Boolean
O> n Local Error GoTo ErrHandler
 >    Debug.Print 1 / 0
E> xit Function
E> rrHandler:
 >    IsInIDE = True
E> nd Function

  Return to Index