readFileQuietly

open fun readFileQuietly(file: File): String(source)

Reads and returns file contents. If some exception is triggered the method returns information about this exception. Useful for including file contents in debug trace / exception messages.

Return

content of the file or the problem description in case file cannot be read.

Parameters

file

to read