Class based local exception handler

For questions and postings not covered by the other forums
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Class based local exception handler

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:28 pm

by Marcelle Goslin >> Wed, 19 Nov 2003 6:09:01 GMT

Hi

I would like to know if it's possible to load a local exception handler at a Class level without having to resort to

on exception-class do method-call-expression;

in each method of the Class?

TIA
Marcelle Golsin

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Class based local exception handler

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:28 pm

by kevin_alcock >> Fri, 21 Nov 2003 17:21:31 GMT

have you read the Exception technical paper? http://www.jadeworld.com/downloads/Exce ... ndling.pdf

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Class based local exception handler

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:28 pm

by Marcelle Goslin >> Sun, 23 Nov 2003 7:18:12 GMT

Hi Kevin

Yes, hence my post.

I guess I'm being hopeful that someone had come up with a technique for defining a class level exception handler without going global.

I have a class for creating/merging word documents and optionally converting them to PDF. I want to totally encapsulate all error handling as well, and only pass back control to the global exception handler for errors I don't want to control.

As the class has quite a few methods, I was hoping I could arm an exception handler in the class constructor (or something similar) and disarm it in the destructor.

Perhaps a peer schema would be the way to go, but as yet I haven't managed to find any doco on how to set them up. (Still looking, but probably in the wrong place...)

Regards
Marcelle Goslin


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 36 guests

cron