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.

Allow logging of Throwables instead of just Exceptions

See original GitHub issue

The Countly.logException(Exception) method’s signature should be changed to Countly.logException(Throwable) (maybe update the name too?) to match the API used by Android’s Log class: http://developer.android.com/reference/android/util/Log.html. This would make it easier to create a Log wrapper that logs the Throwable to countly before passing it on to Android’s Log.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
iartemcommented, Mar 25, 2016

This is part of our next major overhaul of SDK. Countly now has .d, .i, .w, .e, .wtf methods with signatures of (String), (String, Throwable). But it’s not yet released…

0reactions
ArtursKadikiscommented, Mar 7, 2019

Logging throwables is already supported for a few versions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Handling Throwable vs. Exception for logging - Stack Overflow
If the Throwable is an instance of Exception I can just cast and toss to the logger. However, if it's a Throwable that...
Read more >
Java Exceptions and How to Log Them Securely - SentinelOne
It's not enough to log java exceptions: you need to log them securely. In this post, we'll teach you why and how to...
Read more >
9 Best Practices to Handle Java Exceptions - Stackify
Handling Java exceptions isn't easy, especially for beginners. Read this post to understand exceptions and best practices for using them.
Read more >
Logging Exceptions Using SLF4J - Baeldung
In this quick tutorial, we found out how to log exceptions using the SLF4J API. The code snippets are available over in the...
Read more >
Either log or rethrow Java exceptions, but never do both
When an exception occurs in your Java code, you can log it or you can rethrow it -- but don't do both. Here's...
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