ignore

inline fun Throwable?.ignore()

This method does nothing. This is a null-safe call that allows to clearly mark an exception as ignored. This approach is preferred to an empty catch block, as at development time you can create custom ignore() methods for each specific Exception types, import them and pass some debugging or logging code to each implementation. For example:

fun IOException.ignore() { println("This actually happens! $this") }

While other exceptions would still be silently ignored, by adding this method you can log all occurrences of ignored IOException instances. Temporarily changing imports to a custom Throwable.ignore() implementation might also work.