Skip to content

why cannot catch ajax error, net error ? #28

@toohamster

Description

@toohamster

why cannot catch ajax error, net error ?
this my code

window.onerror = function( message, url, line, column, error ) {
// var e = encodeURIComponent;
// ( new Image() ).src = 'http://127.0.0.1:3000/error?message=' + e( message ) +
// '&url=' + e( url ) +
// '&line=' + e( line ) +
// ( error && error.stack ? '&stack=' + e( error.stack ) : '' ) +
// ( column ? '&column=' + e( column ) : '' );
console.warn(message, url, line, column, error);
}

$.getJSON( '',
{f: 'json', 'asdebug-tag': ''},
function(json){
setContent(json);
setTimeout('refresh()',500);
} );

if the url cannot load, the brower return 404 net error , but this error cannot catch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions