Appearance
function error(message: string): never
Throws an IllegalStateException with the given message.
IllegalStateException
message
import { error } from 'kotlinic' const name = null const nonNullName = name ?? error('Name is missing') // will fail with IllegalStateException