[vwnc] Fwd: Runtime Error Handlers

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[vwnc] Fwd: Runtime Error Handlers

Annick Fron-2




Hi,

If I use for all buttons of my application error handling, like :
[self click] on: Error do: [...]
I loose the debugging . What could I use to keep errors in the development image and skip them in the runtime ?
For intance RuntimeSystem isRuntime ifTrue: [Dialog warn: '..'] ifFalse: ?

Best regards
Le 13 août 08 à 13:23, Runar Jordahl a écrit :

Yes, it is possible and very useful. We customize runtime error
handling by overriding these two classes:
RuntimePackager.RuntimeEmergencyNotifier
RuntimePackager.RuntimeFullDumper

Then specify your own classes in the Runtime Builder, or use these two
methods if you build from a script:
#errorNotifierClass:
#imageDumperClass:

You probably only need to subclass from RuntimeEmergencyNotifier,
implement notifyUserOfUnhandledException:, and set the
errorNotifierClass.

Read chapter 15 and 21 of Application Developer's Guide for more information.

Kind regards
Runar Jordahl



Annick Fron




_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

[vwnc] Fwd: Runtime Error Handlers

Annick




Hi,

If I use for all buttons of my application error handling, like :
[self click] on: Error do: [...]
I loose the debugging . What could I use to keep errors in the development image and skip them in the runtime ?
For intance RuntimeSystem isRuntime ifTrue: [Dialog warn: '..'] ifFalse: ?

Best regards
Le 13 août 08 à 13:23, Runar Jordahl a écrit :

Yes, it is possible and very useful. We customize runtime error
handling by overriding these two classes:
RuntimePackager.RuntimeEmergencyNotifier
RuntimePackager.RuntimeFullDumper

Then specify your own classes in the Runtime Builder, or use these two
methods if you build from a script:
#errorNotifierClass:
#imageDumperClass:

You probably only need to subclass from RuntimeEmergencyNotifier,
implement notifyUserOfUnhandledException:, and set the
errorNotifierClass.

Read chapter 15 and 21 of Application Developer's Guide for more information.

Kind regards
Runar Jordahl



Annick Fron




_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Fwd: Runtime Error Handlers

Reinout Heeck
Annick Fron wrote:
>>>
>>> If I use for all buttons of my application error handling, like :
>>> [self click] on: Error do: [...]
>>> I loose the debugging . What could I use to keep errors in the
>>> development image and skip them in the runtime ?
>>> For intance RuntimeSystem isRuntime ifTrue: [Dialog warn: '..']
>>> ifFalse: ?

[self click]
   on: Error
   do: [:ex|
     RuntimeSystem isRuntime
       ifTrue: [Dialog warn: '..']
       ifFalse: [ ex reject ]]


Perhaps implement this code on RuntimeSystem so it is nicely in one place:

   result := RuntimeSystem handleMyApplicationErrorsIn: [self click]


R
-

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc