Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show stacktrace on rejected promise. #7572

Open
Carreau opened this issue Jan 24, 2015 · 1 comment
Open

Show stacktrace on rejected promise. #7572

Carreau opened this issue Jan 24, 2015 · 1 comment
Milestone

Comments

@Carreau
Copy link
Member

Carreau commented Jan 24, 2015

Not just error.message but error.stack in an unfoldable code tag with white-space:pre.

Or at least console-warn it to help debug.

@Carreau
Copy link
Member Author

Carreau commented Jan 24, 2015

Notebook.prototype.load_notebook_error = function (error) {
        this.events.trigger('notebook_load_failed.Notebook', error);
        var msg;
        if (error.name === utils.XHR_ERROR && error.xhr.status === 500) {
            utils.log_ajax_error(error.xhr, error.xhr_status, error.xhr_error);
            msg = "An unknown error occurred while loading this notebook. " +
            "This version can load notebook formats " +
            "v" + this.nbformat + " or earlier. See the server log for details.";
        } else {

            msg = $('<div/>').append($('<p/>').text(error.message));
            msg.append($('<pre/>').text(error.stack));
        }
        dialog.modal({
            notebook: this,
            keyboard_manager: this.keyboard_manager,
            title: "Error loading notebook",
            body : msg,
            buttons : {
                "OK": {}
            }
        });

In notebook.js seem to be a start.

@Carreau Carreau added this to the wishlist milestone Jan 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant