[Seaside] Catching exceptions

Joachim Tuchel jtuchel at objektfabrik.de
Mon Jan 7 13:08:48 UTC 2013


Found the place:

WAExceptionHandler>>#handleFiltered:

Thanks for reading, helped me think ;-)

Joachim

Am 07.01.13 14:04, schrieb Joachim Tuchel:
> Hi Karsten,
>
> in the meantime, I found the reason, and it is as I suspected:
>
> Some places in VA Smalltalk still use instance based exceptions and 
> these will not be caught and therefor not be forwarded to a 
> WAExceptionHandler.
> In VA Smalltalk Object>>#error: signals an instance based exception. 
> So if somewhere in a callback method you use error:, you fire an 
> exception that doesn't get caught by the Seaside machinery.
>
> Instantiations discourages the use of instance based exceptions and is 
> removing them from VAST step by step, but it's not done yet. And they 
> cannot force users to change their code immediately, so I need to find 
> a way to extend Seaside to catch instance based exveptions as well as 
> class based ones.
>
> Does anyone have a quick pointer where to look? I'll dive right into 
> the browsers now and look myself... ;-)
>
> Joachim
>
>
>
> Am 07.01.13 13:49, schrieb Karsten Kusche:
>>
>> It could also be that the exception is raise when the exception 
>> handler is not in place. The handler is added through a filter and if 
>> the exception happens before or after that filter is applied, you see 
>> the debugger.
>>
>> Kind Regards
>> Karsten
>>
>>
>>
>> -- 
>> Karsten Kusche - Dipl. Inf. - karsten at heeg.de
>> Georg Heeg eK - Köthen
>> Handelsregister: Amtsgericht Dortmund A 12812
>>
>> Am Montag, 7. Januar 2013 um 13:43 schrieb Joachim Tuchel:
>>
>>> Hi Norbert,
>>>
>>> thanks for answering.
>>>
>>> In fact, what you describe is what WAApplication>>#exceptionHandler: 
>>> does:
>>>
>>> exceptionHandler: anExceptionHandlerClass
>>> | theFilter |
>>> theFilter := self filters
>>> detect: [ :ea | ea isExceptionFilter ]
>>> ifNone: [ self addFilter: WAExceptionFilter new ].
>>>
>>> theFilter configuration at: #exceptionHandler put: 
>>> anExceptionHandlerClass
>>>
>>> So, yes, I did ;-)
>>>
>>> I have another suspicion: VA Smalltalk has once had (and still supports
>>> it) an instance based exception system, and maybe the exceptions 
>>> that do
>>> not get caught are such exception based ones... I'll investigate this a
>>> little further and let you know what I find out.
>>>
>>> Joachim
>>>
>>>
>>> Am 07.01.13 12:15, schrieb Norbert Hartl:
>>>> Hi Joachim,
>>>>
>>>> Am 07.01.2013 um 10:22 schrieb jtuchel <jtuchel at objektfabrik.de 
>>>> <mailto:jtuchel at objektfabrik.de>>:
>>>>
>>>>> Hi,
>>>>>
>>>>> I have registered a subclass of WAHtmlErrorHandler with my 
>>>>> Application using
>>>>>
>>>>> myApp := WAAdmin register:..asApplicationAt:....
>>>>> myApp exceptionHandler: MyExceptionHandlerClass.
>>>>>
>>>>> And it does show its error page sometimes, but often an Exception 
>>>>> thrown in
>>>>> an ActionCallback simply pops up a debugger in the development 
>>>>> image and
>>>>> silently exits a runtime image.
>>>>>
>>>>> You can sure imagine that this is not my intended behaviour.
>>>>>
>>>>> In the walkback I can clearly see that an exception gets thrown 
>>>>> and handled
>>>>> as usual, My HTML exception handler is never sent a message to.
>>>>>
>>>>> Any ideas?
>>>>>
>>>>> I am using Seaside 3.06 on VA Smalltalk 8.5.2.
>>>> did you add an WAExceptionFilter (myApp addFilter: 
>>>> WAExceptionFilter new)? This class prevents exceptions to be 
>>>> unhandled. The exception filter is configurable for the kind of 
>>>> exception handling you want. It can be walkback handler, email 
>>>> handler, …
>>>>
>>>> Norbert
>>>>
>>>> _______________________________________________
>>>> seaside mailing list
>>>> seaside at lists.squeakfoundation.org 
>>>> <mailto:seaside at lists.squeakfoundation.org>
>>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>
>>> -- 
>>> -- 
>>> 
----------------------------------------------------------------------- 
>>> 
Objektfabrik Joachim Tuchel mailto:jtuchel at objektfabrik.de 
>>> 
Fliederweg 1 http://www.objektfabrik.de
>>> D-71640 Ludwigsburg http://joachimtuchel.wordpress.com
>>> Telefon: +49 7141 56 10 86 0 Fax: +49 7141 56 10 86 1
>>> _______________________________________________
>>> seaside mailing list
>>> seaside at lists.squeakfoundation.org 
>>> <mailto:seaside at lists.squeakfoundation.org>
>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>
>>> Anhänge:
>>> - smime.p7s
>>
>>
>>
>> _______________________________________________
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

-- 
-- 
----------------------------------------------------------------------- 
Objektfabrik Joachim Tuchel          mailto:jtuchel at objektfabrik.de 
Fliederweg 1                         http://www.objektfabrik.de
D-71640 Ludwigsburg 		     http://joachimtuchel.wordpress.com
Telefon: +49 7141 56 10 86 0         Fax: +49 7141 56 10 86 1


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5586 bytes
Desc: S/MIME Kryptografische Unterschrift
Url : http://lists.squeakfoundation.org/pipermail/seaside/attachments/20130107/7d8a39da/smime.bin


More information about the seaside mailing list