Skip to content

Commit

Permalink
Report all errors on playground start up
Browse files Browse the repository at this point in the history
  • Loading branch information
szschaler committed Feb 9, 2024
1 parent 8b4ec0a commit fab9795
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions platform/src/Playground.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,21 @@ function displayErrors(errors){
contentPanelDiv.append(content);
});
}

const otherErrors = errors.filter((e) => !(configErrors.includes(e) || platformErrors.includes(e)))
if (otherErrors.length > 0) {
let contentTitle = document.createElement("h2");
contentTitle.innerText = "Errors:";
contentPanelDiv.append(contentTitle);

otherErrors.forEach( (err) => {
let content = document.createElement("p");
let contentText= `${err.constructor.name}: ${err.message}` ;
content.append(document.createTextNode(contentText));

contentPanelDiv.append(content);
});
}
}

function initializePanels() {
Expand Down

0 comments on commit fab9795

Please sign in to comment.