# silent-error

> stackless unless otherwise requested error

Latest version **1.1.1** (published 2018-10-10) · ISC license · 0 weekly downloads

## Install

```sh
npm install silent-error
pnpm add silent-error
yarn add silent-error
bun add silent-error
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2018-10-10 |
| First published | 2015-06-03 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Stefan Penner |
| Maintainers | stefanpenner |

## Links

- npm: https://www.npmjs.com/package/silent-error
- Repository: https://github.com/stefanpenner/silent-error
- Homepage: https://github.com/stefanpenner/silent-error#readme
- Issues: https://github.com/stefanpenner/silent-error/issues
- npm.io page: https://npm.io/package/silent-error

## Dependencies (1)

- [debug](https://npm.io/package/debug.md) ^2.2.0

## Recent versions

- 1.1.1 (latest) — 2018-10-10
- 1.1.0 — 2017-05-01
- 1.0.1 — 2016-08-07
- 1.0.0 — 2015-06-03

## README

# silent-error [![Build Status](https://travis-ci.org/ember-cli/silent-error.svg)](https://travis-ci.org/ember-cli/silent-error)

An error subclass for humanized errors. This module allows for inter-module detection of errors which are fatal, but where a stacktrace by default provides negative value.

Some use-cases:

* command in your CLI tool is missing
* plugin to your build system is given invalid user-input.

Obviously stack traces can still be valuable. To view the stacks, the following environment variable can be set to `true`

```
SILENT_ERROR=verbose <run program>
```

## Example

```js
// in one node module
async function runCommand(name) {
   // some logic
   throw new SilentError(`command: '${name}' is not installed`);
}
```

```js
// in another node_module
async function caller() {

  try {
    await runCommand('foo');
  } catch(e) {
    SilentError.debugOrThrow(e);
  }

  SilentError.debugOrThrow
}
```

## Installation

```
yarn add silent-error
```

or

```
npm install --save silent-error
```

---
_Source: https://npm.io/package/silent-error · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
