mares-error

1.0.1 • Public • Published

mares-error

mares ddd 패턴시 구현할 error 인터페이스

Installation

npm install --save mares-error

Examples

아래와 같이 MaresError를 상속받아 생성자 및 convert함수를 구현하여야 합니다.

const MaresError = require('mares-error')
class MaresCustomError extends MaresError {
    constructor(error) {
        super(error)
    }
    convert() {
        //todo error handling
    }
}

ETC

환경변수에 ERROR_LOGABLE=true 로 설정하면 not found 에러를 포함하여 모든 에러를 출력해 줍니다.

Package Sidebar

Install

npm i mares-error

Weekly Downloads

2

Version

1.0.1

License

ISC

Unpacked Size

5.98 kB

Total Files

4

Last publish

Collaborators

  • hwaranglee
  • sngsng
  • piorio0919
  • kspark