All Projects → blakeembrey → Make Error Cause

blakeembrey / Make Error Cause

Licence: other
Make your own nested errors

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Make Error Cause

Emperror
The Emperor takes care of all errors personally
Stars: ✭ 201 (+458.33%)
Mutual labels:  error-handling, error-reporting, error
Bugsnag Go
Automatic panic monitoring for Go and Go web frameworks, like negroni, gin, and revel
Stars: ✭ 155 (+330.56%)
Mutual labels:  error-handling, error-reporting, error
Bugsnag Node
[DEPRECATED] Please upgrade to our Universal JS notifier "@bugsnag/js" • https://github.com/bugsnag/bugsnag-js
Stars: ✭ 48 (+33.33%)
Mutual labels:  error-handling, error-reporting, error
TrackJS-Node
TrackJS Error Monitoring agent for NodeJS
Stars: ✭ 26 (-27.78%)
Mutual labels:  error-handling, error, error-reporting
raygun4ruby
The Ruby & Ruby on Rails provider for Raygun
Stars: ✭ 37 (+2.78%)
Mutual labels:  error-handling, error-reporting
Stacked
Stack traces for Swift on Mac and Linux 📚
Stars: ✭ 24 (-33.33%)
Mutual labels:  error-reporting, stack-traces
Thoth
An Error Logger for Go
Stars: ✭ 22 (-38.89%)
Mutual labels:  error-handling, error
go-errors
Flexible, general-purpose error handling for Go.
Stars: ✭ 17 (-52.78%)
Mutual labels:  error-handling, error
failure
An error handling package for Go.
Stars: ✭ 24 (-33.33%)
Mutual labels:  error-handling, error
ErrorLayout
Simple layout to show custom error toast with animation
Stars: ✭ 13 (-63.89%)
Mutual labels:  error-handling, error
Error Report
前端异常上报
Stars: ✭ 20 (-44.44%)
Mutual labels:  error-reporting, error
Bugsnag Laravel
Bugsnag notifier for the Laravel PHP framework. Monitor and report Laravel errors.
Stars: ✭ 746 (+1972.22%)
Mutual labels:  error-handling, error-reporting
sentry-testkit
A Sentry plugin to allow Sentry report interception and further inspection of the data being sent
Stars: ✭ 78 (+116.67%)
Mutual labels:  error-handling, error-reporting
Errorx
A comprehensive error handling library for Go
Stars: ✭ 712 (+1877.78%)
Mutual labels:  error-handling, stack-traces
miette
Fancy upgrade to std::error::Error.
Stars: ✭ 945 (+2525%)
Mutual labels:  error-handling, error-reporting
rust-error-handle
detail rust error handle
Stars: ✭ 47 (+30.56%)
Mutual labels:  error-handling, error
Log Process Errors
Show some ❤️ to Node.js process errors
Stars: ✭ 424 (+1077.78%)
Mutual labels:  error-handling, error
Bugsnag React Native
Error monitoring and reporting tool for native exceptions and JS errors in React Native apps
Stars: ✭ 374 (+938.89%)
Mutual labels:  error-handling, error-reporting
Error Overlay Webpack Plugin
Catch errors with style 💥✨
Stars: ✭ 821 (+2180.56%)
Mutual labels:  error-handling, error
Rxdogtag
Automatic tagging of RxJava 2+ originating subscribe points for onError() investigation.
Stars: ✭ 601 (+1569.44%)
Mutual labels:  error-handling, error-reporting

Make Error Cause

NPM version NPM downloads Build status Test coverage

Make your own nested errors.

Features

  • Compatible with node.js and browsers
  • Works with instanceof
  • Automatic full stack traces in node.js (supports inspect())
  • Output full stack trace with fullStack(err)
  • Extends make-error

Installation

npm install make-error-cause --save

Usage

import { BaseError, fullStack } from "make-error-cause";

class CustomError extends BaseError {
  constructor(message, cause) {
    super(message, cause);
  }
}

const error = new Error("Boom!");
const customError = new CustomError("Another boom!", error);

console.log(customError); // Automatically prints full stack trace using `fullStack(this)`.
console.log(customError.cause); // Check causes via the `.cause` property.

console.log(customError instanceof Error); //=> true

Attribution

Inspired by verror, and others, but created lighter and without core dependencies for browser usage.

Other references:

License

Apache 2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].