Skip to content

Add breadcrumbs to CheckedFromJsonException #1541

@Rofl113

Description

@Rofl113

Good afternoon!
The suggestion is to add bread crumbs so that you can trace all the way to the problem area.

Such information would be useful for debugging or error detection.

"key_ one" => 1 => "key_ two" => 3

The number means which item is in the list

Suggestion: add field to CheckedFromJsonException:

final List<StackTraceJson> parentStack;

Where StackTraceJson is (as an example):

class StackTraceJson {
  const StackTraceJson.key(String this.key)
    : index = null;
  const StackTraceJson.index(int this.index)
    : key = null;
  // Params
  final String? key;
  final int? index;
  // Localized
  @override
  String toString() => (key != null) ? '"$key"' : "$index";
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions