question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

A way to handle error and log

See original GitHub issue

Is there a way to disable logs like path where address data is saved after creation? Also I cannot catch error, it just logs it in console which is a bit annoying.

keythereum.js:421 
Uncaught Error: message authentication code mismatch
    at verifyAndDecrypt (keythereum.js:421)
    at keythereum.js:445
    at keythereum.js:278
    at keythereum.js:30847
    at Item.run (keythereum.js:31226)
    at drainQueue (keythereum.js:31196)

and

Saved to file:
/home/user/parity/keys/chain/UTC--2018-03-01T15:32:02.766Z--c7a168b127181d4b8750aa4015058ff530b8c8b6
To use with geth, copy this file to your Ethereum keystore folder (usually ~/.ethereum/keystore).

I guess that console.log() and console.error() are used and I think it’s not a good idea.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Silurcommented, Mar 5, 2018

@tinybike do we have an ES5-only policy on this repo? or refactoring error handling to ES6 promises works?

0reactions
tinybikecommented, May 9, 2018

@peskic93 if you set keythereum.constants.quiet = true, it will not print out that “Saved to file” message. But AFAIK there’s no real reason to have that message displayed at all, so I’ve simply removed it in the latest patch (1.0.4). Also fixed the un-catchable error; thanks for pointing that out!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to properly handle error logs? - Stack Overflow
In projects I'm involved to, the general guideline is to log errors as verbosely as possible, and to include as much context information...
Read more >
Error Handling and Logging - CodeAhoy
When Error Handling is mentioned, it is referring to the capture of any errors in our application logic that may cause the system...
Read more >
React Error Handling and Logging Best Practices
Any high-quality application must handle errors and unexpected events. Errors should be handled and appropriately logged to assist you in ...
Read more >
React Logging and Error Handling Best Practices - Tek-Tools
First, let's discuss error handling (also called exception handling). Exception handling refers to catching errors and handling them gracefully ...
Read more >
Error monitoring and exception handling in large-scale ...
A solution to handle unhandled exceptions with error monitoring. The first thing you need to do is log unhandled exceptions using your well- ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found