Skip to content

Instantly share code, notes, and snippets.

View johan-gorter's full-sized avatar

Johan Gorter johan-gorter

  • AFAS Software
  • Leusden
View GitHub Profile
@domenic
domenic / 1-promise-error-handling.md
Last active October 31, 2019 02:53
Proposal for promise error handling hooks

Promise Error Handling Hooks

Problem

A common desire in web programming is to log any uncaught exceptions back to the server. The typical method for doing this is

window.onerror = (message, url, line, column, error) => {
  // log `error` back to the server
};