You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
val errorMessage: String = apiResponse.errorMessage(context)
if (errorMessage.isNotEmpty()) {
Timber.e(Exception("Couldn't load more past replies"), errorMessage)
}
The timber call raises the following:
Use single-argument log method instead of null/empty message less... (⌘F1)
Explicitly including the exception message is redundant when supplying an exception to log. Issue id: TimberExceptionLogging
I don't see what's wrong: I have created an exception so that the error is sent to my bug reporting backend, which has a generic error description. Then as an argument I have added the full error message built by my API client: either a network error, or a server error, or just the error message returned by the backend. The error message is a non-null string, which may be empty.
errorMessage is a local variable so it can't be changed by other threads, so in the if block it is a non-empty string.
Just updated to 4.7.1 (kotlin 1.2.60) and the warning persists.
The text was updated successfully, but these errors were encountered:
I have this code:
The timber call raises the following:
I don't see what's wrong: I have created an exception so that the error is sent to my bug reporting backend, which has a generic error description. Then as an argument I have added the full error message built by my API client: either a network error, or a server error, or just the error message returned by the backend. The error message is a non-null string, which may be empty.
errorMessage
is a local variable so it can't be changed by other threads, so in the if block it is a non-empty string.Just updated to 4.7.1 (kotlin 1.2.60) and the warning persists.
The text was updated successfully, but these errors were encountered: