convertOrFail

inline fun <S : Any, T : Any> S.convertOrFail(path: String, from: String, to: String, convert: (S) -> T): T

Hard cell (ladder rows 1/5, and OnFail.Throw on a non-null, no-default target), non-null receiver: ok → converted value; broken → typed MappingException via toMappingException. Nothing is reported — hard failures surface, they are not absorbed. CancellationException rethrows untouched (cancellation is a signal, never data).


@JvmName(name = "convertNullableOrFail")
inline fun <S : Any, T : Any> S?.convertOrFail(path: String, from: String, to: String, convert: (S) -> T): T

Hard cell (ladder rows 1/5) with absence guard, nullable receiver: absent → MappingException.RequiredFieldMissing at path; otherwise behaves like the non-null convertOrFail.