klmr / klmr/sys

Replace `stopifnot` with descriptive error messages

Open
#25 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
R
Stars
13
Forks
1
PR merge metrics
No merged PRs in 30d

Description

I just got the following error message:

```
Error in stopifnot(is.character(description) && length(description) == :
argument "description" is missing, with no default
Calls:
```

That’s it. no context, nothing. It took quite a while to figure out that this was from a call to `opt` that was missing a description. Something like the following would be better:

```
Error in opt:
no description given for option "foo"
```

Or anything, really.

Furthermore, the lack of call stack is irritating too. This should really be fixed in `sys$run` but I have no idea how.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing option validation around opt and the sys$run entry point, then identify where stopifnot produces the reported error. Done means missing option descriptions produce a descriptive error naming the option, and sys$run provides useful call-stack context as requested.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.