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

add informative error message to facilitate debugging #100

Merged
merged 1 commit into from
Jun 10, 2024

Conversation

jasmineirx
Copy link
Contributor

I was running a simulation and encountered an uninformative error message. I was able to track down the source but it took me a while since the error was very generic:

Error in vapply(regimen$type, function(x) cmt_mapping[[x]], FUN.VALUE = numeric(1), :
values must be length 1,
but FUN(X[[1]]) result is length 0

Having this extra check and more informative error message would have saved me some time.

Copy link
Contributor

@dominic-irx dominic-irx left a comment

Choose a reason for hiding this comment

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

lgtm, tricky!

Copy link
Contributor

@roninsightrx roninsightrx left a comment

Choose a reason for hiding this comment

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

👍🏻

@jasmineirx jasmineirx merged commit 4ff83f8 into master Jun 10, 2024
2 checks passed
@jasmineirx jasmineirx deleted the userfriendly_error_message_cmt_mapping branch June 10, 2024 22:22
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.

3 participants