All Projects → quorrajs → Ouch

quorrajs / Ouch

Licence: mit
NodeJS errors for cool kids

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Ouch

atom-perfectionist
Beautify CSS and SCSS
Stars: ✭ 19 (-90.31%)
Mutual labels:  beautify
Go Mod Outdated
Find outdated dependencies of your Go projects. go-mod-outdated provides a table view of the go list -u -m -json all command which lists all dependencies of a Go project and their available minor and patch updates. It also provides a way to filter indirect dependencies and dependencies without updates.
Stars: ✭ 474 (+141.84%)
Mutual labels:  beautify
Wincustomdesktop
自绘桌面框架,用你的代码绘制桌面
Stars: ✭ 109 (-44.39%)
Mutual labels:  beautify
pretty-remarkable
Plugin for prettifying markdown with https://github.com/jonschlinkert/remarkable using custom renderer rules.
Stars: ✭ 22 (-88.78%)
Mutual labels:  beautify
Pterm
✨ #PTerm is a modern go module to beautify console output. Featuring charts, progressbars, tables, trees, and many more 🚀 It's completely configurable and 100% cross-platform compatible.
Stars: ✭ 449 (+129.08%)
Mutual labels:  beautify
Lme
An npm package to simply and beautifully log to console.
Stars: ✭ 29 (-85.2%)
Mutual labels:  beautify
tag-picker
Better tags input interaction with JavaScript.
Stars: ✭ 27 (-86.22%)
Mutual labels:  beautify
Vscode Powertools
A swiss army knife with lots of tools, extensions and (scriptable) enhancements for Visual Studio Code.
Stars: ✭ 150 (-23.47%)
Mutual labels:  beautify
Unibeautify
One Beautifier to rule them all, One Beautifier to clean them, One Beautifier to bring them all and in the darkness sheen them
Stars: ✭ 466 (+137.76%)
Mutual labels:  beautify
Videomoments
With this software, you can do all kinds of Personalised Customize and beautifying to your videos.
Stars: ✭ 85 (-56.63%)
Mutual labels:  beautify
Sublimejsprettier
JsPrettier is a Sublime Text Plug-in for Prettier, the opinionated code formatter.
Stars: ✭ 355 (+81.12%)
Mutual labels:  beautify
Latexindent.pl
Perl script to add indentation (leading horizontal space) to LaTeX files. It can modify line breaks before, during and after code blocks; it can perform text wrapping and paragraph line break removal. It can also perform string-based and regex-based substitutions/replacements. The script is customisable through its YAML interface.
Stars: ✭ 415 (+111.73%)
Mutual labels:  beautify
Org Link Beautify
Beautify org links with colors and icons.
Stars: ✭ 50 (-74.49%)
Mutual labels:  beautify
vim-prismo
A Vim plugin to decorate your commented titles.
Stars: ✭ 21 (-89.29%)
Mutual labels:  beautify
Atom Beautify
📣 Help Wanted - Looking for Maintainer: https://github.com/Glavin001/atom-beautify/issues/2572 | 💄 Universal beautification package for Atom editor (⚠️ Currently migrating to https://github.com/Unibeautify/ and have very limited bandwidth for Atom-Beautify Issues. Thank you for your patience and understanding ❤️ )
Stars: ✭ 1,501 (+665.82%)
Mutual labels:  beautify
pika
Quickly design beautiful screenshots and open graph images
Stars: ✭ 412 (+110.2%)
Mutual labels:  beautify
Cdpvideorecord
An video camera,you can have realtime of a beautify,and change camera position,or turn on/off flash.Details see demo.
Stars: ✭ 27 (-86.22%)
Mutual labels:  beautify
Vim Autoformat
Provide easy code formatting in Vim by integrating existing code formatters.
Stars: ✭ 2,000 (+920.41%)
Mutual labels:  beautify
Spicetify Themes
A community-driven collection of themes for customizing Spotify through Spicetify (https://github.com/khanhas/spicetify-cli)
Stars: ✭ 3,034 (+1447.96%)
Mutual labels:  beautify
Backtrace
Makes Python tracebacks human friendly
Stars: ✭ 80 (-59.18%)
Mutual labels:  beautify

Ouch

NodeJS errors for cool kids

npm version Build Status Quality Documentation Status


Ouch!

Ouch is a NodeJS implementation of PHP's Whoops library. It's not an exact port of Whoops, but implements similar functionality and uses same front end resources in some of its error handlers. It is an error handler base/framework for NodeJs. Out-of-the-box, it provides a pretty error interface that helps you debug your web projects, but at heart it's a simple yet powerful stacked error handling system.

Pretty page handler demo

Blue theme

Orange theme

Installation

The source is available for download from GitHub. Alternatively, you can install using Node Package Manager (npm):

npm install ouch

Usage examples

    // With PrettyPageHandler
    http.createServer(function nsjfkj(req, res){

        if (req.url === '/favicon.ico') {
            res.writeHead(200, {'Content-Type': 'image/x-icon'} );
            res.end();
            return;
        }

        var d = domain.create();

        d.on('error', function(e){
            var ouchInstance = (new Ouch).pushHandler(
                    new Ouch.handlers.PrettyPageHandler('orange', null, 'sublime')
                );
            ouchInstance.handleException(e, req, res, function (output) {
                console.log('Error handled properly')
            });
        });
        d.run(function(){

            // your application code goes here

        });

    }).listen('1338', 'localhost');


    // With custom callback
    var ouchInstance = (new Ouch).pushHandler(
        function(next, exception, inspector, run, request, response){

            // custom handler logic

            next();
        });

    ouchInstance.handleException(e, req, res, function (output) {
        console.log('Error handled properly')
    });

For more options, have a look at the example files in examples to get a feel for how things work. Also take a look at the API Documentation and the list of available handlers below.

Available Handlers

Ouch currently ships with the following built-in handlers, available in the require("ouch").handlers namespace:

  • PrettyPageHandler - Shows a pretty error page when something goes pants-up
  • JsonResponseHandler - Process errors and returns information on them as a JSON string.
  • CallbackHandler - Wraps a callable as a handler. You do not need to use this handler explicitly, Ouch will automatically wrap any callable you pass to ouchInstance.pushHandler.

Todo

- Add more handlers.

License

Ouch is open-sourced software licensed under the MIT license.

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