Skip to content

[Flutter GPU] Propagate native error detail back through the Dart API #186768

Description

@bdero

Use case

Native failures in Flutter GPU currently surface to Dart only as a bool returned from the Internal* bindings. Dart re-raises a generic Exception("Failed to append draw") (and similar). Impeller emits failure detail via VALIDATION_LOG to stderr, but none of that detail makes it back to the Dart caller. Diagnosing failures from Dart is harder than it needs to be, especially as more callers adopt the API.

Proposal

Plumb Impeller's fml::Status (or an equivalent structured error type) from the native side back through Flutter GPU's Internal* bindings, and surface it in Dart as a descriptive exception that names the operation and includes the underlying status message. Apply this consistently across the Flutter GPU Dart API rather than fixing it ad hoc per method.

Discussed in #186639.

Metadata

Metadata

Assignees

No one assigned

    Labels

    engineflutter/engine related. See also e: labels.flutter-gputeam-fluttergpuOwned by Flutter GPU team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    🤔 Needs Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions