3.0.1 • Published 3 years ago

@unegma/error-handler v3.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
3 years ago

THIS PACKAGE IS DEPRECIATED AND WILL BE REPLACED WITH @unegma/logger

Error Handler Utility

  • Console log version (basic logging)
  • Slack Version (posts errors to Slack based on desired timestamp formate)

Usage

npm install @unegma/error-handler --save

const {
  SLACK_ERROR_LOG
} = process.env;
const { SlackErrorHandler } = require('@unegma/error-handler');
const slackErrorHandler = new SlackErrorHandler(SLACK_ERROR_LOG);

...

try {
  throw new Error();

} catch(error) {
  await slackErrorHandler.handleError('myFunction', `myModule failed.`, error);
}

Regular Logging (not async):

const {
  SLACK_ERROR_LOG
} = process.env;
const { ErrorHandler } = require('@unegma/error-handler');
const errorHandler = new ErrorHandler();

...

try {
  throw new Error();

} catch(error) {
  errorHandler.handleError('myFunction', `myModule failed.`, error);
}
2.0.0

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago

1.4.20

5 years ago

1.4.21

5 years ago

1.4.19

5 years ago

1.4.15

5 years ago

1.4.17

5 years ago

1.4.16

5 years ago

1.4.18

5 years ago

1.3.15

5 years ago

1.2.15

5 years ago

1.2.14

5 years ago

1.1.14

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago