1.1.0 • Published 1 year ago

@rmtc/errors v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@rmtc/errors

Custom errors for the @rmtc/toolchain CLI.

!WARNING This package is intended for internal use by @rmtc/toolchain. It's probably not useful by itself.

!WARNING This project is intended for use in @rowanmanning's projects. It's free to use but I don't offer support for use-cases outside of what I need.

Table of Contents

Requirements

This library requires the following to run:

Usage

Install the module with npm:

npm install @rmtc/errors

This module exports error classes for use across the rest of this project:

const {ToolchainError} = require('@rmtc/errors');
throw new ToolchainError('this is a message');

You can pass a code as a property on the second argument to the error constructor to provide a machine-readable alternative to the message:

throw new ToolchainError('this is a message', { code: 'EXAMPLE_CODE' });

Contributing

See the central README for a contribution guide and code of conduct.

License

Licensed under the MIT license. Copyright © 2023, Rowan Manning

1.1.0

1 year ago

1.0.0

1 year ago

0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago