All Projects → babel-utils → babel-errors

babel-utils / babel-errors

Licence: MIT license
Nicer error messages for Babel

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to babel-errors

redux-airbrake
Redux middleware for Airbrake error logging
Stars: ✭ 20 (+33.33%)
Mutual labels:  error-handling
raygun4android
Android crash reporting provider for Raygun
Stars: ✭ 19 (+26.67%)
Mutual labels:  error-handling
kotlin-multiplatform-example
A Kotlin multiplatform example app that targets Android, ReactJS, iOS, JavaFx, and Spring Boot
Stars: ✭ 115 (+666.67%)
Mutual labels:  error-handling
co demo
A step-by-step guide about how to avoid callback hell with ES6 Promises + generators (aka make your own "co")
Stars: ✭ 17 (+13.33%)
Mutual labels:  error-handling
express-error-slack
Express error handling middleware for reporting error to Slack
Stars: ✭ 14 (-6.67%)
Mutual labels:  error-handling
optionals
Rust-like error handling and options for TypeScript and Deno!
Stars: ✭ 97 (+546.67%)
Mutual labels:  error-handling
pony-cause
Ponyfill and helpers for the standardized Error Causes
Stars: ✭ 42 (+180%)
Mutual labels:  error-handling
friendly-error
Show uncaught errors friendly in Node.js.
Stars: ✭ 75 (+400%)
Mutual labels:  error-handling
go-errors
A super tiny package for error encapsulation in idiomatic Go
Stars: ✭ 14 (-6.67%)
Mutual labels:  error-handling
of
🍬 Promise wrapper with sugar 🍬
Stars: ✭ 13 (-13.33%)
Mutual labels:  error-handling
auto-async-wrap
automatic async middleware wrapper for expressjs errorhandler.
Stars: ✭ 21 (+40%)
Mutual labels:  error-handling
elmah.io
ELMAH error logger for sending errors to elmah.io.
Stars: ✭ 31 (+106.67%)
Mutual labels:  error-handling
raygun4py
Python provider for Raygun
Stars: ✭ 18 (+20%)
Mutual labels:  error-handling
SolveWithStack
Android library for helping you to reach out to best possible answer for your bug/error available on stack overflow and will show it in your Android Studio Console only.
Stars: ✭ 15 (+0%)
Mutual labels:  error-handling
custom error
Define custom errors without boilerplate using the custom_error! macro.
Stars: ✭ 70 (+366.67%)
Mutual labels:  error-handling
TrackJS-Node
TrackJS Error Monitoring agent for NodeJS
Stars: ✭ 26 (+73.33%)
Mutual labels:  error-handling
fortran-error-handler
Comprehensive error framework for applications requiring functional and robust error handling, utilising the power of modern object-oriented Fortran.
Stars: ✭ 19 (+26.67%)
Mutual labels:  error-handling
safe
🛡 PHP functions smarten up to throw exceptions instead of returning false or triggering errors.
Stars: ✭ 15 (+0%)
Mutual labels:  error-handling
node-graceful-shutdown
Gracefully shutdown your modular NodeJS application.
Stars: ✭ 20 (+33.33%)
Mutual labels:  error-handling
nested-error-stacks
A node.js module for creating Error objects with nested Errors in stacktraces
Stars: ✭ 86 (+473.33%)
Mutual labels:  error-handling

babel-errors

Nicer error messages for Babel

import createBabelFile from 'babel-file';
import {BabelError, prettyError, buildCodeFrameError} from 'babel-errors';

const file = createBabelFile(...);

let path = file.path;
let {line, column} = path.loc.start;

throw prettyError(createErrorWithLoc('Error at this position', line, column));
throw buildCodeFrameError(path, 'Error with this Path');

createErrorWithLoc(message, line, column)

This lets you add location information to your errors.

wrapErrorWithCodeFrame(err)

You can use this when capturing errors thrown by Babel or constructed using createErrorWithLoc to add a code frame when possible.

buildCodeFrameError(path, message)

You can use this to build a code frame error around a path with a specified message.

Use this instead of path.buildCodeFrameError when you aren't running inside a Babel plugin.

toErrorStack(error)

Creates string with error name, message, stack/code frame.

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].