Exception Handlers

Discussions about design and architecture principles, including native JADE systems and JADE interoperating with other technologies
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Exception Handlers

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:20 am

by JADE Kid - Ray Hidayat >> Sat, 22 Apr 2000 7:04:56 GMT

Okay, this message is about exception handlers.

I have been reading about them, and as far as I know, to use them you have to do two things.

Code them and Arm them.

Well to arm them you do something like this.

on NotificationException do notificationException (exception)

Then you write the exception handler... Not posted here.
And it should work.

I was just wondering, where do you arm them, can you arm more than one, and do you only arm it for a certain method, for a certain class, or for the current application?

--
Ray Hidayat
JADE Kid - 2000
www.jadekids.com

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

Re: Exception Handlers

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:20 am

by Eric Peachey >> Tue, 25 Apr 2000 21:50:45 GMT
Okay, this message is about exception handlers.

Have a look at the paper on exception handlers available at www.jade.co.nz - select Developer Information and then Technical Papers. There's plenty of stuff there. The JADE Discovery Kit also offers plenty of help and examples on the use of exception handlers. You can get a copy of the JADE Discovery Kit on CD for a nominal sum if you don't want to download it (about 10NZD I think).

Eric in Dunedin

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

Re: Exception Handlers

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:20 am

by Arjan van Hasselt >> Wed, 26 Apr 2000 3:49:31 GMT

Exception Handlers are armed in each method where the exception is expected to occur. They can be disarmed anywhere in your code and are automatically disarmed at the end of your method. The only exception to this is if you have armed your exception handler with the "global" option. Then the exception handler remains armed until you disarm it or the application is terminated.

You can arm as many as you like and they go into the exception handling stack. At the very top of the stack is JADE's own default handler which should never be displayed in your final application.

Cheers ...AJ

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

Re: Exception Handlers

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:20 am

by JADE Kid - Ray Hidayat >> Thu, 27 Apr 2000 20:08:58 GMT

Thanks. I'll try that.

--
Ray Hidayat
JADE Kid - 2000
www.jadekids.com

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

Re: Global Exception Handlers?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:20 am

by JADE Kid - Ray Hidayat >> Wed, 5 Jul 2000 22:11:02 GMT

So if you want to set a global exception handler, where do you arm it? In the Global class?

--
Ray Hidayat
JADE Kid - 2000
www.jadekids.com

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

Re: Global Exception Handlers?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:20 am

by Michael Jones >> Wed, 5 Jul 2000 22:26:37 GMT

In the starting method of you app, typically in the initialize method, then disarm
in the finalize method.


Return to “Design and Architecture”

Who is online

Users browsing this forum: No registered users and 7 guests

cron