http-problem-details-mapper
Version:
Mapper functions for http-problem-details
16 lines • 587 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.ErrorMapper = void 0;
class ErrorMapper {
constructor(ErrorType) {
if (this.constructor === ErrorMapper) {
throw new TypeError('Can not construct abstract class.');
}
if (this.mapError === ErrorMapper.prototype.mapError) {
throw new TypeError(`Please implement abstract method 'mapError' in ${this.constructor.name}.`);
}
this.error = ErrorType.name;
}
}
exports.ErrorMapper = ErrorMapper;
//# sourceMappingURL=IErrorMapper.js.map
;