At 11:02 25/08/2010, Nick Ager wrote:
I've noticed that non-validation errors are trapped
by the code in
PRContentsWidget>>#onAnswerCommand: aCommand
Hi Nick,
You have certainly also noticed that this is a key method in the
Pier's request handling process. In my experience, and just from a
practical point of view, I found it useful for "production" images to
have here Error instead of MAError, since even in case of an
unexpected error, Pier keeps handling requests gracefully, while
rendering the error message on the client side. For development
images, it would be sufficient to add a 'halt' inside the exception
handling block.
I should add that, in practice, I've encountered rarely such cases,
and, as far as I remember, those cases have always been related to my
own add-ons. Nevertheless, it seems hard to definitely assess that
during the execution of ALL commands, in ALL end-user use cases, the
exceptional situations will strictly be limited to validation errors.
If this makes sense, then Error would be a better choice.
Regards,
Reza