Lightweight and simple error creation in JavaScript.
var flaw = require('flaw')
// Simple error creation
var ParsingError = flaw('ParsingError')
throw ParsingError('Unknow token at...', { line: 1 })
// Raising errors in an expression
n > 0 ? m / n
: raise(flaw('DivideByZero', 'Can\'t divide by 0'))
$ npm install flaw
$ npm install -g calliope
$ calliope build
Then open docs/api/index.html
in your browser.
MIT/X11. ie.: do whatever you want.