Package Exports
- jsm-exceptions
- jsm-exceptions/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (jsm-exceptions) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
jsm-exceptions
File Structure
The following is a list of files in the ./src
directory:
index.js
: The main entry point of the library.CustomError.js
: Defines a custom error class.ErrorHandler.js
: Contains functions for handling errors.utils.js
: Utility functions used across the library.
Usage
To use this library, install it via npm:
npm install jsm-exceptions
Then, import and use it in your project:
const { CustomError, ErrorHandler } = require('jsm-exceptions');
try {
// Your code that might throw an error
} catch (error) {
ErrorHandler.handle(error);
}
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
License
This project is licensed under the MIT License - see the LICENSE file for details.