VAST 8.0.1 / Seaside Tips: Registering an Error Handler in your application

VAST 8.0.1 doesn’t support continuations, and this can make a few things a little complicated, since many packages in Seaside 3.0 alpha 5 need Continuations even though I think they shouldn’t. The configuration application which is used to vsiually change settings of an application is such an example. This could surely use show:onAnswer: instead of call: with no effect, but it doesn’t.

Not that you really have to change settings by using this application, it’s sometimes nicer and easier than changing code, especially if you just want to try several alternatives.

To make a long story short:  I just wanted to change the error handler for my application, because I needed to debug some code and the default configuration of Seaside Applications handles errors by providing a little error page and forgetting about the exception.

I wanted to register the WADebugErrorHandler for my application.

The exception handlers and other configurations, however, aren’t simple settings that can be set using an expression like

(WAAdmin register: self asApplicationAt: 'MyApp')
preferenceAt: #charSet put: 'iso-8859-15';

This is due to the fact that an Exception handler is a kind of filter and filters are maneged a little bit different.

Fortunately, there is a little helper method in WARequestHandler, a superclass of WAApplication. It’s name is exceptionHandler: and makes life a lot easier since it does the lookup of the right filter for you.

So in the end, all you have to do in the method that registers the root component is:

(WAAdmin register: self asApplicationAt: 'MyApp')
preferenceAt: #charSet put: 'iso-8859-15';
exceptionHandler: WADebugErrorHandler.


One thought on “VAST 8.0.1 / Seaside Tips: Registering an Error Handler in your application

  1. You are right… none of the included tools are supposed to be relying on continuations any more. Those usages in the configuration app crept back in, but I think they’ve been fixed in the Seaside repository.

Comments are closed.