1.0.1 • Published 5 years ago

mares-error v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

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 에러를 포함하여 모든 에러를 출력해 줍니다.