1

I would like to use Swazoo to write a simple REST test server. When the server receives a request, some dialog shows it to the user and they provide a response. I subclassed SwazooResource and make sure a request to the server always gets a resource of this type. This class overrides answerTo:

answerTo: aRequest

    ^self createOkResponseWithContents: (Dialog request: 'Please provide a response')

This however makes the Swazoo server return a 500 response, since all exceptions are catched and handled in Swazoo.HTTPConnection>>produceResponseFor:

Any hints on how to achieve this?

Cantillon
  • 1,588
  • 1
  • 12
  • 23
  • Start adding 'self halt' in exception blocks to override default exception handling. You should also add your own exception handler into #answerTo: to catch errors from your code – Janko Mivšek May 16 '13 at 12:08
  • Thanks, if you post this as an answer, I'll accept it. – Cantillon May 27 '13 at 15:24

1 Answers1

-1

Is there a special reason not to use the Seaside-REST stuff?

[edit] Why the -1?

Stephan Eggermont
  • 15,847
  • 1
  • 38
  • 65
  • I did not vote your answer down, but to answer your question: I have to build on code that already exists. – Cantillon May 27 '13 at 15:24