Opened 7 years ago

Closed 4 years ago

#16239 closed defect (wontfix)

xhr try/catch handler

Reported by: prashantjain68 Owned by: Bryan Forbes
Priority: undecided Milestone: tbd
Component: IO Version: 1.8.1
Keywords: Cc:
Blocked By: Blocking:

Description

I am new to dojo and learning dojo the hard way which is debugging the source code.

One thing I noticed: All my errors originated from the xhr class (as per the Chrome console). In one case, my xhr call succeeded but still the error handler registered with xhr was called. After debugging, I realized that my callback was being invoked in a try/ catch block in the xhr class, line 432. The callback then executed another 5000 lines of code and if there is an error in one of them, the xhr calls the error handler or reports to the browser that an error occurred in xhr line 432. I am now putting break points at different places in those 5000 lines of code to see where the error is actually happening.

This is very mis-leading and a nightmare to debug. The load and error callback registered with xhr should not be called within a try/ catch.

Attachments (1)

Screen shot 2012-10-25 at 9.02.49 AM.png (82.4 KB) - added by prashantjain68 7 years ago.
Browser error and callstack

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by prashantjain68

Browser error and callstack

comment:1 Changed 7 years ago by bill

Component: GeneralIO
Owner: set to Bryan Forbes

comment:2 Changed 4 years ago by dylan

Resolution: wontfix
Status: newclosed

Given that dojo/_base/xhr has been deprecated in favor of dojo/request, I'm going to close this out.

Note: See TracTickets for help on using tickets.