Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1232 from DennisKehrig/master
Browse files Browse the repository at this point in the history
Improve console output of LiveDevelopment errors (#1200)
  • Loading branch information
gruehle committed Jul 11, 2012
2 parents 97f4ae1 + 27c6086 commit d892cac
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/LiveDevelopment/LiveDevelopment.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,18 @@ define(function LiveDevelopment(require, exports, module) {

/** Triggered by Inspector.error */
function _onError(error) {
console.error(error.message);
}
var message = error.message;

// Additional information, like exactly which parameter could not be processed.
var data = error.data;
if ($.isArray(data)) {
message += "\n" + data.join("\n");
}

// Show the message, but include the error object for further information (e.g. error code)
console.error(message, error);
}

/** Run when all agents are loaded */
function _onLoad() {
var doc = _getCurrentDocument();
Expand Down

0 comments on commit d892cac

Please sign in to comment.