(fix) don't abort on unhandled requests

Ludovic Marcotte 2017-03-09 13:57:27 -05:00
parent 50f25b0597
commit 5d9673415a
1 changed files with 6 additions and 2 deletions

View File

@ -452,8 +452,12 @@ static BOOL debugLeaks;
- (WOResponse *) handleException: (NSException *) _exc
inContext: (WOContext *) _ctx
{
printf("EXCEPTION: %s\n", [[_exc description] cString]);
abort();
WOResponse *resp;
NSLog(@"EXCEPTION: %s\n", [[_exc description] cString]);
resp = [WOResponse responseWithRequest: [_ctx request]];
[resp setStatus: 501];
return resp;
}
/* runtime maintenance */