Skip to content

Provide more helpful feedback on epi_slide length/nrow mismatches #351

Closed
@brookslogan

Description

@brookslogan

Currently, we get errors like

Error in `Abort()`:
! The slide computations must either (a) output a single element/row
each, or (b) one element/row per appearance of the reference time value in the
local window.

There are two issues:

  1. The error shouldn't be "in Abort()"; we should use something like call = caller_env() in the abort call inside Abort (part of Augment Abort & co.; add rlang condition tutorial, helpers #102 but that's a large, stale WIP), or use cli_abort instead.
  2. This doesn't give very helpful info about what computation(s) output the wrong number of elements/rows. We could pack the slide computations list and the expected counts in an error object & refer to them in the error message, and/or print the first one with a violation of the existing pattern.

Metadata

Metadata

Assignees

Labels

P0high priorityREPLImproved print, errors, etc.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions