Le 11/07/2013 15:42, Sven Van Caekenberghe a écrit :
Vincent,
On 11 Jul 2013, at 15:06, Vincent Blondeau <vincent.blondeau@polytech-lille.net> wrote:
I use a Zinc Server. So when I do the request, Zinc catch the Exception and send an error as response. ZnSingleThreadedServer>>#handleRequestProtected: request "Handle request and return a response. If a Smalltalk Error is thrown, return a HTTP Server Error response."
^ [ self authenticateAndDelegateRequest: request ] on: Error do: [ :exception | self debugMode ifTrue: [ exception pass ] ifFalse: [ self logServerError: exception. ZnResponse serverError: exception printString ] ]
AFAICT this code catches Error, not Exception, hence it would let Notification through. No ?
Sven
Indeed but I use the Zinc-Rest-Server and all Exceptions are caught: ZnRestServerDelegate>>handleRequest: request | call | (call := self match: request) ifNil: [ ^ self noHandlerFound: request ]. (self authenticate: call) ifFalse: [ ^ self callUnauthorized: request ]. ^ [ self execute: call ] on: Exception do: [ :exception | request server debugMode ifTrue: [ exception pass ] ifFalse: [ request server logServerError: exception. self serverError: request exception: exception ] ] Vicnent