safeInt

fun safeInt(block: () -> Int): String

Runs block and stringifies its int result, returning "unavailable" if it throws.

Return

The int as a string, or "unavailable".

Parameters

block

Int-producing lambda that may fail.