Skip to content

Print last_error.instruction in xor caught an error message #236

Open
@folex

Description

ATM, if you have a lot of errors, it looks like this

xor caught an error: value '[]' does not contain element for idx = '0'
call failed with an error `value '[]' does not contain element for idx = '0'`, peerId `12D3KooWSD5PToNiLQwKDXsu8JSysCwUt8BVUJEqCHcDe7P5h45e`
xor caught an error: value '[]' does not contain element for idx = '0'
call failed with an error `value '[]' does not contain element for idx = '0'`, peerId `12D3KooWSD5PToNiLQwKDXsu8JSysCwUt8BVUJEqCHcDe7P5h45e`
xor caught an error: value '[]' does not contain element for idx = '0'
call failed with an error `value '[]' does not contain element for idx = '0'`, peerId `12D3KooWSD5PToNiLQwKDXsu8JSysCwUt8BVUJEqCHcDe7P5h45e`
xor caught an error: value '[]' does not contain element for idx = '0'
call failed with an error `value '[]' does not contain element for idx = '0'`, peerId `12D3KooWSD5PToNiLQwKDXsu8JSysCwUt8BVUJEqCHcDe7P5h45e`
xor caught an error: value '[]' does not contain element for idx = '0'
call failed with an error `value '[]' does not contain element for idx = '0'`, peerId `12D3KooWSD5PToNiLQwKDXsu8JSysCwUt8BVUJEqCHcDe7P5h45e`
xor caught an error: value '[]' does not contain element for idx = '0'
call failed with an error `value '[]' does not contain element for idx = '0'`, peerId `12D3KooWSD5PToNiLQwKDXsu8JSysCwUt8BVUJEqCHcDe7P5h45e`
xor caught an error: value '[]' does not contain element for idx = '0'
call failed with an error `value '[]' does not contain element for idx = '0'`, peerId `12D3KooWSD5PToNiLQwKDXsu8JSysCwUt8BVUJEqCHcDe7P5h45e`

It's hard to tell what caused this. I suggest to print more information here. For example, format like this:

xor caught an error: 
\t $last_error.message 
\t on peer $last_error.peer_id
\t failed instruction: $last_error.instruction

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    C-dxcategory: developer experience improvementsC-good-first-issuecategory: good for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions