Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.js 500B

12345678910111213141516171819202122232425
  1. 'use strict';
  2. const util = require('util');
  3. let installed = false;
  4. const hardRejection = (log = console.error) => {
  5. if (installed) {
  6. return;
  7. }
  8. installed = true;
  9. process.on('unhandledRejection', error => {
  10. if (!(error instanceof Error)) {
  11. error = new Error(`Promise rejected with value: ${util.inspect(error)}`);
  12. }
  13. log(error.stack);
  14. process.exit(1);
  15. });
  16. };
  17. module.exports = hardRejection;
  18. // TODO: Remove this for the next major release
  19. module.exports.default = hardRejection;