Lines Matching refs:error
1 # pug-error
3 Standard error objects for pug. This module is intended for use by the lexer, parser, loader, link…
5 …Status](https://img.shields.io/travis/pugjs/pug-error/master.svg)](https://travis-ci.org/pugjs/pug…
6 …m.org/pugjs/pug/status.svg?path=packages/pug-error)](https://david-dm.org/pugjs/pug?path=packages/…
7 [](https://www.npmjs.org/package/pug-erro…
11 npm install pug-error
16 var error = require('pug-error');
19 ### `error(code, message, options)`
21 Create a Pug error object.
23 `code` is a required unique code for the error type that can be used to pinpoint a certain error.
25 `message` is a human-readable explanation of the error.
29 - `filename`: the name of the file causing the error
32 - `src`: the Pug source, if available, for pretty-printing the error context
34 The resulting error object is a simple Error object with additional properties given in the argumen…
39 var error = require('pug-error');
41 var err = error('MY_CODE', 'My message', {line: 3, filename: 'myfile', src: 'foo\nbar\nbaz\nbash\nb…