Skip to content

Better error messages - revisited #376

Closed
@nickray

Description

@nickray

In some cases, upgrading from 0.14.0 to 0.16.0 seems to reduce the error message quality. I'm trying to svd2rust the ARM Musca-B1 SVD (from ARM.Musca_B1_BSP.1.1.0.pack), which has bugs. Not quite sure the license or I would attach the SVD.

Would it be possible to output the SVD line number that causes the error?

Case 1

0.14.0:
thread 'main' panicked at 'unknown access variant: read', /home/nicolas/.cargo/registry/src/github.com-1ecc6299db9ec823/svd-parser-0.6.0/src/lib.rs:426:18

0.16.0:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: SVDError { inner: SVDError { inner: SVDError { inner: 
unknown access variant found }
In register `SPIISR` }
In peripheral `SPI0` }', src/libcore/result.rs:999:5

Case 2

0.14.0: thread 'main' panicked at '/home/nicolas/.cargo/registry/src/github.com-1ecc6299db9ec823/svd-parser-0.6.0/src/lib.rs:354 tree.get_child_text("description")', src/libcore/option.rs:1008:5

0.16.0: (with -l trace): thread 'main' panicked at 'called Option::unwrap()on aNone value', src/libcore/option.rs:347:21

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