Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve verbosity of panic messages in CsMat #135

Merged
merged 1 commit into from
Nov 20, 2018

Conversation

rth
Copy link
Contributor

@rth rth commented Nov 11, 2018

This improves verbosity of some panic messages in CsMat.

Currently, on the following example,

use sprs::CsMat;

let indptr = vec![0, 5, 8];
let indices = vec![761698, 328290, 828689, 761698, 780185, 901149, 780185, 144749, 258307];
let data = vec![1, 1, 1, 1, 1, 1, 1, 1, 1];
let a = CsMat::new((2, 1000000), indptr, indices, data);

I'm getting an obscure Indptr length does not match dimension panic message, so this improves the verbosity of such messages a bit, to show the lengths.

@rth
Copy link
Contributor Author

rth commented Nov 11, 2018

rustfm is failing on the code I have not changed (and I did run cargo fmt prior to commiting).

toastronics added a commit to toastronics/sprs that referenced this pull request Nov 11, 2018
Fixes `cargo fmt --check` error encountered in PR sparsemat#135
@vbarrielle vbarrielle merged commit dfd7c0d into sparsemat:master Nov 20, 2018
@vbarrielle
Copy link
Collaborator

Thanks, that's more ergonomic indeed.

@rth rth deleted the improve-panic-message-verbosity branch November 20, 2018 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants