jsm-exceptions
Version: 
A comprehensive TypeScript exception library with HTTP status code support, detailed JSDoc documentation, and backward compatibility. Provides structured error handling for web applications and APIs.
38 lines (37 loc) • 1.31 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const base_exception_1 = __importDefault(require("./base.exception"));
/**
 * @fileoverview Not Implemented exception (HTTP 501)
 * @author dr. Salmi <reevosolutions@gmail.com>
 */
/**
 * Exception thrown when a feature or functionality is not implemented.
 * Corresponds to HTTP 501 Not Implemented status code.
 *
 * @class NotImplementedException
 * @extends {BaseException}
 * @example
 * ```typescript
 * throw new NotImplementedException('Feature not yet implemented');
 * throw new NotImplementedException('Payment method not supported', {
 *   paymentMethod: 'cryptocurrency'
 * });
 * ```
 */
class NotImplementedException extends base_exception_1.default {
    /**
     * Creates an instance of NotImplementedException.
     *
     * @param {string} [message='Not Implemented'] - The error message
     * @param {Record<string, any>} [context] - Additional context about what's not implemented
     * @memberof NotImplementedException
     */
    constructor(message = 'Not Implemented', context) {
        super(message, 501, context);
    }
}
exports.default = NotImplementedException;