Open Bug 1422048 Opened 2 years ago Updated 2 years ago

Exception logs not useful when an httpd method called from handleResponse throws

Categories

(Testing :: General, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: mayhemer, Unassigned)

Details

See [0].  The method that was throwing was response.finish(), with a stack like:

httpd.js!response.finish()
file_blocked_script.sjs!finishBlockedRequest()
file_blocked_script.sjs!handleRequest(metadata, response)
httpd.js!_writeFileResponse(..)

The problem was that |response| was not processAsync()'ed.


It would be good to fix or enhance the code at [1] to include the source of the exception or change the way we throw exceptions from httpd methods (just throw Cr.NS_ERROR_UNEXPECTED; apparently looses the file:line info).


[0] https://bugzilla.mozilla.org/show_bug.cgi?id=1392382#c24
[1] https://dxr.mozilla.org/mozilla-central/rev/cad9c9573579698c223b4b6cb53ca723cd930ad2/netwerk/test/httpserver/httpd.js#2810
Component: httpd.js → General
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.