throwDecodeFailure function
Isolate-side: signal that image bytes could not be decoded.
Throws an IsolateRpcExactError whose verbatim wire message starts with
decodeFailurePrefix; the main side's rethrowOrFormatException maps it to
a FormatException. Use after an imdecode that returns an empty Mat.
Implementation
Never throwDecodeFailure([
String detail = 'Image bytes could not be decoded.',
]) {
throw IsolateRpcExactError('$decodeFailurePrefix $detail');
}