sdk icon indicating copy to clipboard operation
sdk copied to clipboard

[vm] Add more information to kernel loading errors

Open dcharkes opened this issue 6 months ago • 0 comments

The failures in runtime/vm/kernel_binary.cc are predefined strings. For example:

https://github.com/dart-lang/sdk/blob/ad9a13a1c1ad7c8ae64d4ea79de73201509c765d/runtime/vm/kernel_binary.cc#L146

However, this makes the error messages somewhat uninformative in the case where the user of the dart_api.h does not know precisely why the kernel file is invalid.

We should consider expanding these error messages with more details.

(This means changing all the call sites to free errors if they are not nullptr.)

Context:

  • https://github.com/flutter/flutter/issues/168809

dcharkes avatar Jun 10 '25 21:06 dcharkes