line

fun line(type: String, value: Any?): StringBuilder

The builder, not a String: the head is already in it when the payload lands, so it costs no copy of its own. Both callers consume it at once — one toString(), one append. Of what a value's own code throws, only the watchdog's ScriptTimeoutError gets out — see threw.