gqtryrun
v0.0.4
Published
A never-fail-mechanic for handling try catch inside callbacks and other small scope trys
Readme
gqtryrun
__
____ _______/ |________ ___.__._______ __ __ ____
/ ___\ / ____/\ __\_ __ < | |\_ __ \ | \/ \
/ /_/ >< <_| | | | | | \/\___ | | | \/ | / | \
\___ / \__ | |__| |__| / ____| |__| |____/|___| /
/_____/ |__| \/ \/ Description
A never-fail-mechanic for handling try catch inside callbacks and other small scope trys.
We all have done it, when callback is silent handling your error and you have no clue why it failed to do anything from the callback.
This small utility engulf the runtime function in a try catch and print out the error for you using console.error.
You will never see no error when callback failed to do anything.
It is also compatible with both sync and async mode in one function. Callback parameter is nullable.Getting Started
Dependencies
none
Installing
- npm install gqtryrun
Executing program
tryrun=require("gqtryrun")
o={}
o.query=function(o,cb){
//your logic
}
tryrun.run(o.query,o,cb)Help
see test.coffee for how to use itAuthors
- glidev5
Version History
- 0.1
- Initial Release
License
This project is licensed under the MIT License - see the LICENSE.md file for details
Acknowledgments
- thank you for taking sometime reading this repo :)
