# xrtlibrary-bughandler

> Bug handler module of XRT library.

Latest version **1.0.3** (published 2019-07-18) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install xrtlibrary-bughandler
pnpm add xrtlibrary-bughandler
yarn add xrtlibrary-bughandler
bun add xrtlibrary-bughandler
```

## 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.0.3 |
| Published | 2019-07-18 |
| First published | 2019-07-18 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | The XRT Authors. |
| Maintainers | chinpui |

## Links

- npm: https://www.npmjs.com/package/xrtlibrary-bughandler
- npm.io page: https://npm.io/package/xrtlibrary-bughandler

## Recent versions

- 1.0.3 (latest) — 2019-07-18
- 1.0.2 — 2019-07-18
- 1.0.1 — 2019-07-18

## README

# XRTLibrary-BugHandler

## Introduction

A simple bug handler module.

## Installation

To install this package, you can use NPM by typing following command:

```
npm install xrtlibrary-bughandler --save
```

Then you can import this library in your JavaScript code:

```
const XRTLibBugHandler = require("xrtlibrary-bughandler");
```

## APIs

### ReportBug(message, [thrown=false], [ecls=Error])

Report bug.

<u>Note(s)</u>:
 - If there is no bug handler registered, the message and the stack would be printed to standard error.

<u>Parameter(s)</u>:
 - message (*String*): The bug message.
 - thrown (*Boolean*): (Optional) True if the error should be thrown (default: false).
 - ecls (*{new(message: String): Error}*): (Optional) The error class (default: Error).

### RegisterBugHandler(handler)

Register a bug handler.

<u>Parameter(s)</u>:
 - handler (*(error: Error) =&gt; void*): The bug handler.

### UnregisterBugHandler

Unregister a bug handler.

<u>Parameter(s)</u>:
 - handler (*(error: Error) =&gt; void*): The bug handler.

<u>Return value</u>:
 - (*Boolean*) True if succeed (false if the handler was not registered).

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