# annotation-exception-handlers

> annotation-exception-handlers

Latest version **1.0.11** (published 2022-03-11) · ISC license · 0 weekly downloads

## Install

```sh
npm install annotation-exception-handlers
pnpm add annotation-exception-handlers
yarn add annotation-exception-handlers
bun add annotation-exception-handlers
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.11 |
| Published | 2022-03-11 |
| First published | 2022-03-09 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 27.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | saeed mohammed alabidi /saeed1adm@gmail.com |
| Maintainers | saeed_alabidi |
| Keywords | annotation-exception-handlers |

## Links

- npm: https://www.npmjs.com/package/annotation-exception-handlers
- Repository: https://github.com/saeedAlobidi/exception-handler
- Homepage: https://github.com/saeedAlobidi/exception-handler#readme
- Issues: https://github.com/saeedAlobidi/exception-handler/issues
- npm.io page: https://npm.io/package/annotation-exception-handlers

## Dependencies (4)

- [cors](https://npm.io/package/cors.md) ^2.8.5
- [body-parser](https://npm.io/package/body-parser.md) ^1.19.0
- [automapper-ts](https://npm.io/package/automapper-ts.md) ^1.9.0
- [cookie-parser](https://npm.io/package/cookie-parser.md) ^1.4.5

## Recent versions

- 1.0.11 (latest) — 2022-03-11
- 1.0.10 — 2022-03-10
- 1.0.9 — 2022-03-10
- 1.0.8 — 2022-03-10
- 1.0.7 — 2022-03-10
- 1.0.6 — 2022-03-10
- 1.0.5 — 2022-03-10
- 1.0.4 — 2022-03-10
- 1.0.3 — 2022-03-10
- 1.0.2 — 2022-03-10
- 1.0.1 — 2022-03-09
- 1.0.0 — 2022-03-09

## README

# typescript library

annotation-exception-handlers is a library that allows you to write a try and catch  block using annotation that makes your code more arranged 
like this   @validate("name your function").






 
 

# NPM


```NPM

npm i annotation-exception-handlers

```



#### Demo
```Example
 import validate from "annotation-exception-handlers/validate";

 class test {
    constructor() {}


    // this function not fire error so all functionality  call on correct way
    // print hellow saeed 
    @validate("function_without_error")
    function_without_error() {
      console.log(" hello saeed 1")
    }


    // this function   fire error so all functionality  not work
    // print method that fire error and error message
    @validate("function_with_error")
    function_with_error() {
        throw 'this error because you not make star  for this library ^_^';
        console.log(" hello saeed 2")
    }

   // if you want customize  error function you can override the default 
   // for example send email
   error(error) {

    // TODO: sned email that contain error messgae 
    console.log(error)
}
 

}

```

 

 
# About me

 name:Saeed Mohammed Saleh Alabidi
email: saeed1adm@gmail.com

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