main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
460 bytes
|
Line | |
---|
1 | var createCustomError = require('../utils/createCustomError');
|
---|
2 |
|
---|
3 | module.exports = function SyntaxError(message, input, offset) {
|
---|
4 | var error = createCustomError('SyntaxError', message);
|
---|
5 |
|
---|
6 | error.input = input;
|
---|
7 | error.offset = offset;
|
---|
8 | error.rawMessage = message;
|
---|
9 | error.message = error.rawMessage + '\n' +
|
---|
10 | ' ' + error.input + '\n' +
|
---|
11 | '--' + new Array((error.offset || error.input.length) + 1).join('-') + '^';
|
---|
12 |
|
---|
13 | return error;
|
---|
14 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.