In the rule, is there a way to log some debugging info? In my project
TooGenericExceptionCaught
is not catching a below code
fun test() {
var body = ""
var title = ""
var canShowValidNotification = true
val json = JSONObject(nestedBody)
try
{
body = json.getString("body")
title = json.getString("title")
}
catch (exception: Exception)
{
// malformed do not show notification
canShowValidNotification = false
val payload = exception.message ?: "empty or null"
val errorMessage = "Push notification has Invalid Payload"
}
}
while when I add this in the
TooGenericExceptionCaughtSpec
as test it is successfully passing.
I want to publish the
detekt
in my local maven with logs and then analyse the issue