|
-
October 4th, 1999, 01:40 PM
#1
Err.Raise - whats up with this?
How do i propogate the error back to the calling function, and let that function handle it? I am using err.raise but for some reason its not handled in the calling function. It always results in runtime error. BTW, i have an error handler in the calling function.
'function called
public Function Add(objfav as clsFavorites, optional key as Variant) as clsFavorites
'some details omitted for clarity
on error GoTo raiseError
'set the properties passed into the method
mCol.Add objfav, key
'return the object
set Add = objfav
Exit Function
raiseError:
Err.Raise Err.Number
End Function
-
October 4th, 1999, 02:14 PM
#2
Re: Err.Raise - whats up with this?
You do have an 'On Error Goto ....' in the calling function don't you ?
You'll have to post the code for the calling function as well, so we can see what's giving you problems.
Chris Eastwood
CodeGuru - the website for developers
http://codeguru.developer.com/vb
-
October 4th, 1999, 06:10 PM
#3
Re: Err.Raise - whats up with this?
Is this happening in the IDE or in the executable.
If it's in the IDE, make sure you don't have break on all errors checked in Tool | Options | General.
Charles Zimmerman
http://www.freevbcode.com
mailto:[email protected]
-
October 5th, 1999, 07:04 AM
#4
Re: Err.Raise - whats up with this?
If your (called) function does not have an Error handler (no 'On Error ...' line) the error will allways be propagated to the calling function.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|