[Tutor] Callbacks and exception handling
Pete
pkoek11 at xs4all.nl
Fri Aug 13 03:56:31 CEST 2010
Hi,
I've been writing some code which uses callbacks. I have not used callbacks much before, but it does not seem too difficult so far.
One thing though - I noticed that when an exception is raised in the callback function, that exception doesn't actually "show up" in the calling program.
Two questions:
1) Theoretically - why is this? I guess I've seen callback functions a little like subroutines, therefore it seems intuitive that an exception would be propagated up to the calling routine.
2) How can you catch an exception in the callback function?
The code is not easily isolated, but can post if necessary.
thanks again,
Pete
More information about the Tutor
mailing list