This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/bfj/src/error.js
2019-08-11 20:48:02 +02:00

22 lines
479 B
JavaScript

'use strict'
module.exports = { create }
function create (actual, expected, line, column) {
const error = new Error(
/* eslint-disable prefer-template */
'JSON error: encountered `' + actual +
'` at line ' + line +
', column ' + column +
' where `' + expected +
'` was expected.'
/* eslint-enable prefer-template */
)
error.actual = actual
error.expected = expected
error.lineNumber = line
error.columnNumber = column
return error
}