npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ember-error-handler

v0.4.0

Published

Addon handles uncatched errors. Handled error can be displayed on customizable error page or passed through custom logic. By default addon includes consumers for local and remote logging of errors.

Downloads

1,043

Readme

Ember-error-handler - Error handling for ambitious web applications.

Addon handles uncatched errors. Handled error can be displayed on customizable error page or passed through custom logic. By default addon includes consumers for local and remote logging of errors.

How it works

Errors thrown are catched by listener bound to error producers (window, Ember ...).
Errors handled by listeners are passed to various consumers which could log the error, render error page or perform additional logic. Customers and listeners are fully customizable.

Non catched error page shown in production environment

alt tag

Non catched error page shown in development environment

alt tag

Installation

  • ember install ember-error-handler

then throw error somewhere in application and watch screen and console.

Configuration

configure listeners to use

Define services to use as listeners. Definition could be based on environment. Service must extend base-listener class.

# config/environment.js

if (environment === 'development') {
  ENV['ember-error-handler'] = {
      listeners: [
          'service:ember-error-handler/listener/window-listener',
          'service:ember-error-handler/listener/ember-listener'
      ]
  };
}

configure consumers to use

Define services to use as listeners. Definition could be based on environment. Service must extend base-consumerclass. Consumers are executed in order.

# config/environment.js

if (environment === 'development') {
   ENV['ember-error-handler'] = {
        consumers: [
             'service:ember-error-handler/consumer/wsod-consumer',
             'service:ember-error-handler/consumer/console-consumer'
        ]       
   }
}

wsod-consumer - configure component shown when error is handled by environment

# config/environment.js

{
  "ember-error-handler": {
      "wsod-component-production": 'my-own-component-for-wsod-screen-production'
      "wsod-component-development": 'my-own-component-for-wsod-screen-development'
      "wsod-component-": 'my-own-component-for-wsod-screen'
  }
}

Extendability

TODO

Listeners

TODO

Consumers

TODO

Ember-exex

Addon plays nicely with Exceptional Exceptions addon: https://github.com/janmisek/ember-exex