Last change
on this file since 59329aa was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
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.