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
Currently it is very difficult to filter exceptions in common kotlin code, because we don't have access to the original exception object which causes the event. We need to compare the type name and package name of the exceptions as strings. What normally is a simple hint is MyException is turned into
inlinefun <reifiedT> SentryException.isOfType(): Boolean {
val qualifiedName =T::class.qualifiedName ?: error("Cannot get qualified name of ${T::class}")
val module = qualifiedName.substringBeforeLast(".")
val type = qualifiedName.substringAfterLast(".")
return module ==this.module && type ==this.type
}
But this does not work for exception subtypes, so if there is an exception which is a subtype of MyException it is impossible to filter this with the current beforeSend because one had to know all subtypes to handle them all individually.
The text was updated successfully, but these errors were encountered:
Currently it is very difficult to filter exceptions in common kotlin code, because we don't have access to the original exception object which causes the event. We need to compare the type name and package name of the exceptions as strings. What normally is a simple
hint is MyException
is turned intoBut this does not work for exception subtypes, so if there is an exception which is a subtype of MyException it is impossible to filter this with the current
beforeSend
because one had to know all subtypes to handle them all individually.The text was updated successfully, but these errors were encountered: