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 sparse triplet constructor error messages #12177

Merged
merged 1 commit into from
Jul 17, 2015
Merged

Conversation

jakebolewski
Copy link
Member

Makes sparse matrix triplet constructor error messages more consistent and gives them better context to the source of the problem.

((iind <= nrow) && (jind <= ncol)) || throw(BoundsError())
iind > 0 || throw(ArgumentError("all I index values must be > 0"))
jind > 0 || throw(ArgumentError("all J index values must be > 0"))
iind <= nrow || throw(ArgumentError("all I index values must be ≤ nrows"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nrows isn't consistent with the signature

@kshyatt kshyatt added sparse Sparse arrays error handling Handling of exceptions by Julia or the user labels Jul 16, 2015
jakebolewski added a commit that referenced this pull request Jul 17, 2015
Improve sparse triplet constructor error messages
@jakebolewski jakebolewski merged commit f4eb92b into master Jul 17, 2015
@jakebolewski jakebolewski deleted the jcb/sptriperr branch July 17, 2015 13:41
@tkelman tkelman mentioned this pull request Oct 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error handling Handling of exceptions by Julia or the user sparse Sparse arrays
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants