All files / src/modules/implementations/journal/syntax syntax-errors.js

100% Statements 13/13
100% Branches 3/3
100% Functions 2/2
100% Lines 13/13

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 1467x 67x 67x 803x 122x 122x 122x 122x 122x 122x 122x 803x 67x  
'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
module.exports = ({ core: { publicErrors: { errorCodes, withCode }, }, }) => {
    function syntaxError(message, source, line, column) {
        const error = withCode(new SyntaxError(`${source}:${line}:${column}: ${message}`), errorCodes.SYNTAX);
        error.source = source;
        error.line = line;
        error.column = column;
        error.detail = message;
        return error;
    }
    return { syntaxError };
};