[vwnc] 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] Runtime Error Handlers

Annick
How is it possible to write a specific Errorhandler for a runtime,  
that just open a Dialog warn and then quits ?

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] Runtime Error Handlers

Reinout Heeck-2
Annick Fron wrote:
> How is it possible to write a specific Errorhandler for a runtime,  
> that just open a Dialog warn and then quits ?

[   ...your code...
]   on: UnhandledException
     do: [:ex |
        Dialog warn: ex description.
         [    ObjectMemory quitWithError: 42
         ]    on: UnhandledException
              do: [:ex |
                  "Double error: flushing files failed"
                  ObjectMemory quitPrimitiveWithError: 42]]






HTH,

Reinout
-------


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

Re: [vwnc] Runtime Error Handlers

Runar Jordahl
In reply to this post by Annick
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
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc