"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const setprototypeof_1 = require("../util/setprototypeof");
class ValidationException extends Error {
    constructor(m) {
        super(m);
        this.validationException = true;
        // there must be no code between super() and setPrototypeOf
        // https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md
        // (url cd) #extending-built-ins-like-error-array-and-map-may-no-longer-work
        setprototypeof_1.setPrototypeOf(this, ValidationException.prototype);
        // this is a polyfill https://github.com/wesleytodd/setprototypeof. When target will be
        // "es6" it can be replaced with "Object.setPrototypeOf"
    }
}
exports.ValidationException = ValidationException;
(function (ValidationException) {
    /**
     * This is an TS 1.6+ TypeGuard as described here: https://www.typescriptlang.org/docs/handbook/advanced-types.html
     */
    function isValidationException(o) {
        return typeof o === "object" && !!o.validationException;
    }
    ValidationException.isValidationException = isValidationException;
})(ValidationException = exports.ValidationException || (exports.ValidationException = {}));
//# sourceMappingURL=ValidationException.js.map