UNPKG

@mlightcad/common

Version:

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![npm version](https://img.shields.io/npm/v/@mlightcad/common.svg)](https://www.npmjs.com/package/@mlightcad/common)

56 lines 1.76 kB
/** * @fileoverview Standard error definitions for the AutoCAD Common library. * * This module provides a centralized collection of commonly used error types * with descriptive messages for consistent error handling across the library. * * @module AcCmErrors * @version 1.0.0 */ /** * Collection of standard error types used throughout the AutoCAD Common library. * * Each error getter returns a new instance of the error to prevent shared state issues. * Use these predefined errors for consistent error handling and messaging. * * @example * ```typescript * import { AcCmErrors } from './AcCmErrors' * * // Throw standard errors * throw AcCmErrors.ILLEGAL_PARAMETERS * throw AcCmErrors.NOT_IMPLEMENTED * * // Check error types * try { * // some operation * } catch (error) { * if (error.message === AcCmErrors.ZERO_DIVISION.message) { * // handle division by zero * } * } * ``` */ export declare const AcCmErrors: { /** * Throw error ILLEGAL_PARAMETERS when cannot instantiate from given parameter */ readonly ILLEGAL_PARAMETERS: ReferenceError; /** * Throw error ZERO_DIVISION to catch situation of zero division */ readonly ZERO_DIVISION: Error; /** * Error to throw from BooleanOperations module in case when fixBoundaryConflicts not capable to fix it */ readonly UNRESOLVED_BOUNDARY_CONFLICT: Error; /** * Error to throw from LinkedList:testInfiniteLoop static method * in case when circular loop detected in linked list */ readonly INFINITE_LOOP: Error; readonly CANNOT_INVOKE_ABSTRACT_METHOD: Error; readonly OPERATION_IS_NOT_SUPPORTED: Error; readonly NOT_IMPLEMENTED: Error; }; //# sourceMappingURL=AcCmErrors.d.ts.map