All Projects → ryanmorr → try-catch

ryanmorr / try-catch

Licence: Unlicense License
Experimental alternative to a try/catch block in JavaScript

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to try-catch

try-to-catch
functional try-catch wrapper for promises
Stars: ✭ 30 (-3.23%)
Mutual labels:  error, try-catch
rust-error-handle
detail rust error handle
Stars: ✭ 47 (+51.61%)
Mutual labels:  error
of
🍬 Promise wrapper with sugar 🍬
Stars: ✭ 13 (-58.06%)
Mutual labels:  try-catch
PageStatusTransformer
A low invasive state management on Android
Stars: ✭ 12 (-61.29%)
Mutual labels:  error
custom-exception-middleware
Middleware to catch custom or accidental exceptions
Stars: ✭ 30 (-3.23%)
Mutual labels:  error
try-inline
An easy inline error handling wrapper for async promises and syncronous functions
Stars: ✭ 24 (-22.58%)
Mutual labels:  try-catch
laravel-exception-notify
Laravel 中异常监控报警通知(Bark、Chanify、钉钉群机器人、Discord、飞书群机器人、邮件、PushDeer、QQ 频道机器人、Server 酱、Slack、Telegram、企业微信群机器人、息知)。
Stars: ✭ 52 (+67.74%)
Mutual labels:  error
go-errors
Flexible, general-purpose error handling for Go.
Stars: ✭ 17 (-45.16%)
Mutual labels:  error
ignition-self-diagnosis
Perform self diagnosis checks right on your Ignition error page
Stars: ✭ 19 (-38.71%)
Mutual labels:  error
ignition
A beautiful error page for PHP apps
Stars: ✭ 171 (+451.61%)
Mutual labels:  error
craft-webperf
Webperf helps you build & maintain high quality websites through Real User Measurement of your website's performance
Stars: ✭ 24 (-22.58%)
Mutual labels:  error
catch-react-error
A framework using React Boundary handles error easily
Stars: ✭ 39 (+25.81%)
Mutual labels:  error
FancyTrack
FancyTrack - JavaScript Error Tracking library from @FancyGrid
Stars: ✭ 83 (+167.74%)
Mutual labels:  error
errata
Source code error pretty printing
Stars: ✭ 41 (+32.26%)
Mutual labels:  error
ignition-tinker-tab
An Ignition tab to tinker with your Laravel app
Stars: ✭ 30 (-3.23%)
Mutual labels:  error
Xcode-Error-Collection
总结的Xcode报错问题以及解决方法,希望在开发的路上都可以少走一些弯路。
Stars: ✭ 45 (+45.16%)
Mutual labels:  error
failure
An error handling package for Go.
Stars: ✭ 24 (-22.58%)
Mutual labels:  error
wrapcheck
A Go linter to check that errors from external packages are wrapped
Stars: ✭ 141 (+354.84%)
Mutual labels:  error
fault
Functional errors with formatted output
Stars: ✭ 16 (-48.39%)
Mutual labels:  error
ignition-code-editor
Add inline code editing to your ignition page
Stars: ✭ 44 (+41.94%)
Mutual labels:  error

tryCatch

Emulates a native try/catch block for customized functionality and greater performance benefits in some circumstances. Please refer to the blog post for more detailed information regarding this project. Be advised, this is an expertimental project, use at your own risk.

Usage

The function has two required parameters, the first being a "try" function to test code, the second being a "catch" function which will be invoked and passed an error object if an exception is raised.

tryCatch(function(){
	// try something   
}, function(error){
	// handle error
});

Returning false in the "catch" function will allow the error to propagate to the browser. Returning anything else or nothing at all will suppress the error.

License

This project is dedicated to the public domain as described by the Unlicense.

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