node-web-mvc
Version:
node spring mvc
21 lines (20 loc) • 1.07 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
/**
* @module UnexpectedTypeException
*/
const Tracer_1 = __importDefault(require("../servlets/annotations/annotation/Tracer"));
const Exception_1 = __importDefault(require("./Exception"));
class UnexpectedTypeException extends Exception_1.default {
constructor(context) {
var _a;
const { current, currentField, currentTyper } = context;
const name = Tracer_1.default.getFullName(current.ctor, currentField);
const constraintName = Tracer_1.default.getFullName(current.nativeAnnotation.constructor);
super(`No validator could be found for constraint '${constraintName}' validating type '${(_a = currentTyper === null || currentTyper === void 0 ? void 0 : currentTyper.type) === null || _a === void 0 ? void 0 : _a.name}'. Check configuration for '${name}'`);
}
}
exports.default = UnexpectedTypeException;