# ee-error

> Extends the native error object with a setName & setDescription method

Latest version **0.1.0** (published 2013-08-23) · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

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

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2013-08-23 |
| First published | 2013-08-23 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | * |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Michael van der Weg |
| Maintainers | ee |

## Links

- npm: https://www.npmjs.com/package/ee-error
- Repository: https://github.com/eventEmitter/ee-error
- Issues: https://github.com/eventEmitter/ee-error/issues
- npm.io page: https://npm.io/package/ee-error

## Recent versions

- 0.1.0 (latest) — 2013-08-23

## README

# ee-error

Extends the native error object with a setName & setDescription method

## installation

npm install ee-error

## usage
	
	// load the module in the root of your project
	require( "ee-error" );


	try{
		throw new Error( "not good! you created a try catch block without any useful functionality!" ).setName( "NotGoodException" );
	}
	catch ( err ) {
		if ( err.name === "NotGoodException" ){
			console.log( err ); // { [NotGoodException: not good! you created a try catch block without any useful functionality!] name: 'NotGoodException' }
		}
	}


if you're using the ee-log class the output of log.trace( err ) would look like this:

	23 11:11:32.159 > /test.js 12:6, Object.<anonymous>             >>> [Trace]
	--------------------------------------------------------------------------------
	NotGoodException: not good! you created a try catch block without any useful functionality!
	--------------------------------------------------------------------------------
	                      /test.js   12:13  Object.<anonymous>
	                     module.js  456:26  Module._compile
	                     module.js  474:10  Object.Module._extensions..js
	                     module.js  356:32  Module.load
	                     module.js  312:12  Function.Module._load
	                     module.js  497:10  Function.Module.runMain
	                       node.js  119:16  startup
	                       node.js  901:3   
	--------------------------------------------------------------------------------

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