Coerce a thrown value into an Error.
Callbacks receive a real Error rather than unknown, so consumers can read .message without narrowing at every call site. Non-Error throws are wrapped rather than stringified into the message, keeping the original as cause.
unknown
.message
cause
Coerce a thrown value into an Error.
Callbacks receive a real Error rather than
unknown, so consumers can read.messagewithout narrowing at every call site. Non-Error throws are wrapped rather than stringified into the message, keeping the original ascause.