Skip to content

Instantly share code, notes, and snippets.

@haldarmahesh
Last active September 2, 2019 06:24
Show Gist options
  • Save haldarmahesh/9d79614810afbb7e19b1cec88ed12a1d to your computer and use it in GitHub Desktop.
Save haldarmahesh/9d79614810afbb7e19b1cec88ed12a1d to your computer and use it in GitHub Desktop.
import logger from '../logSetup';
processLoan(id: number, userId: number) {
try {
getLoanDeatilsById()
} catch(error) {
log.error(`Failed to do getLoanDetails with id ${id} hence throwing error`, error);
// good example: provide what failed, and how you are handling.
// e.g here on fail I am throwing
throw error;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment