Opened 13 years ago

Closed 12 years ago

#1092 closed enhancement (wontfix)

Add toString method to dojo.io.Error object

Reported by: guest Owned by: dylan
Priority: high Milestone: 0.9
Component: General Version: 0.3
Keywords: Cc: robert.coup@…
Blocked By: Blocking:

Description

Having a toString method of the error object makes a fair bit of sense for error handlers, logging, and "more error detail" dialogs.

Possible update -

src/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

    this.toString = function() {
        return this.type + " " + this.number + ": " + this.message;
    }
}

Change History (3)

comment:1 Changed 13 years ago by dylan

Milestone: 0.5
Owner: changed from anonymous to dylan

seems like a useful feature to have, adding to the milestone schedule

comment:2 Changed 13 years ago by dylan

Status: newassigned

comment:3 Changed 12 years ago by Adam Peller

Resolution: wontfix
Status: assignedclosed

don't think this exists anymore in 0.9

Note: See TracTickets for help on using tickets.