Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#921 closed enhancement (fixed)

ContentPane handling of status errors

Reported by: [email protected] Owned by: mumme
Priority: high Milestone:
Component: Widgets Version: 0.3
Keywords: ContentPane "error handling" Cc:
Blocked By: Blocking:


When retreiving remote data into ContentPane?, if the server response with status error, for example 500 or 404, the contentPane just display "Error Loading <url> <status #> <status text>. This is done in "_downloadExternalContent" of ContentPane?.

The error is handled in such way:, "Error loading '" + url + "' (" + e.status + " "+ e.statusText + ")" , "onDownloadError");

and then onDownloadError is a stub function.

I propose a change to handle it like this:, url, e, "onDownloadError");

and then provide a default behavior in onDownloadError to display the text:

"Error loading '" + url + "' (" + e.status + " "+ e.statusText + ")"

Doing this will allow developer to extend and modify the behavior of ContentPane? by overriding just the onDownloadError if they choose to display the response text from the server instead of dojo's error message.

Change History (3)

comment:1 Changed 16 years ago by bill

Milestone: 0.4
Owner: changed from anonymous to mumme

comment:2 Changed 16 years ago by mumme

Resolution: fixed
Status: newclosed

Hi !

As of r4673 there is an easier way to grab the specifics of the io.bind call.

So this makes debugging a dynamic page much easier.


<div dojoType="ContentPane" href="somefaultypage"
 onDownloadError="var e=arguments[0];this.setContent(e.responseHeaders+'<br>'+e.responseText);e.preventDefault();">

Or look in test_RemotePane.html.

/ Fredrik

comment:3 Changed 15 years ago by (none)

Milestone: 0.4

Milestone 0.4 deleted

Note: See TracTickets for help on using tickets.