Opened 13 years ago

Closed 12 years ago

#1251 closed defect (fixed)

dojo.io.error. Accespts type and number as a parameter but they are not used anywhere.

Reported by: me@… Owned by: James Burke
Priority: high Milestone: 0.9
Component: IO Version: 0.3
Keywords: io error parameters browserIO Cc:
Blocked By: Blocking:

Description (last modified by dylan)

//Line 163, io.js

dojo.io.Error = function(msg, type, num){
	this.message = msg;
	this.type =  type || "unknown"; // must be one of "io", "parse", "unknown"
	this.number = num || 0; // per-substrate error number, not normalized
}

What is type and number for ? My assumption would be that the Type wold be the indicator that I was trying to do an IO, and the number would be the 404 (for example) that I get back from the server.

This is a typical example of how io.Error is used in the IO code:

// Line 269, BrowserI0.js

var errObj = new dojo.io.Error("XMLHttpTransport Error: "+http.status+" "+http.statusText);

Would it be 'better' to have that written as:

// Line 269, BrowserI0.js

var errObj = new dojo.io.Error("XMLHttpTransport Error: "+http.status+" "+http.statusText, 'io', http.status);

So those other two error properties actually have values?

Or have I misunderstood what this is doing?

Change History (3)

comment:1 Changed 13 years ago by dylan

Description: modified (diff)
Milestone: 0.5

comment:2 Changed 13 years ago by dylan

Owner: changed from alex to James Burke

comment:3 Changed 12 years ago by James Burke

Resolution: fixed
Status: newclosed

dojo.io.Error does not exist in 0.9. Closing.

Note: See TracTickets for help on using tickets.