View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000237 | Composr | core | public | 2011-01-28 18:30 | 2011-04-28 16:20 |
Reporter | ChrisW | Assigned To | Chris Graham | ||
Severity | Feature-request | ||||
Status | closed | Resolution | fixed | ||
Product Version | |||||
Fixed in Version | |||||
Summary | 0000237: Built-in stack trace handling for AJAX calls | ||||
Description | Composr tends to give very informative output whenever something goes wrong during page generation. Once a page has been rendered, however, making calls to the site via AJAX leaves developers pretty much in the dark about any problems handling these calls. Sometimes a full page stack trace will be sent in response, which is useful but ideally such traces would get caught by some default Javascript and displayed prominently (eg. replacing the contents of body) rather than given straight to the callback. Other times a server will give no information other than an error status code, yet calling the same code from within a page load will generate a nice stack trace. I've found the best ways to debug AJAX calls to be 3-line printf debugging statements (make new tempcode, attach message to tempcode, return tempcode) since echo isn't too useful; and to temporarily replace an entire page call with the code being called by AJAX. As more and more features are implemented after page load via Javascript, I think that it's going to be increasingly important to handle such problems in as uniform a way as Composr's stack traces do during page generation. I think the most difficult part of this would be working out the most appropriate architecture, taking into account requirements like turning it on and off based on keep_ parameters (eg. only active if keep_fatalistic is set) and even per call via a parameter (eg. "get me this content if you can, but leave it alone if there's any problem"). Personally I'd be happy enough if this only works for load_snippet, but the more extensively it can be implemented the better. | ||||
Tags | No tags attached. | ||||
Time estimation (hours) | |||||
Sponsorship open | |||||