UNPKG

node-web-mvc

Version:
20 lines (19 loc) 797 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const Exception_1 = __importDefault(require("./Exception")); class IllegalMappingPatternError extends Exception_1.default { constructor(pattern) { super(); const indicator = '^'; const count = pattern.indexOf('**'); const empty = []; for (let i = 0; i < count; i++) { empty.push(' '); } this.message = `\n\nInvalid mapping pattern detected:\n${pattern}\n${empty.join('')}${indicator}\nNo more pattern data allowed after {*...} or ** pattern element\n\n`; } } exports.default = IllegalMappingPatternError;