0.0.1 • Published 2 years ago

@cascadeos/dynamic-assert v0.0.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

Dynamic Assert

This library contrains assert-related utilities for use in Dynamic.

The Dynamic system distinguishes between two types of errors:

  • Internal errors, which are unexpected and should be fixed as soon as possible.
  • User errors, which are the responsibility of the user and are usually the result of bad user usage of the system.

This module provides a useful set of functions to write concise assertions for both types of errors.

Usage

import * as assert from '@cascadeos/dynamic-assert';

assert.INTERNAL(context, version, errors.InvalidVersion, 'Custom error details');
assert.USER(context, version, errors.WorkerNoElement, 'Custom error details');
0.0.1

2 years ago