New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ember-error-handler

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-error-handler

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.

latest
Source
npmnpm
Version
0.4.0
Version published
Weekly downloads
16
23.08%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

ember-addon

FAQs

Package last updated on 28 May 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts