Skip to content

Don't catch errors in Stat computations #3528

Closed
@thomasp85

Description

@thomasp85

Currently any error from a Stat's compute_*() method is caught and converted to a warning. This makes debugging difficult as the backtrace is lost and you cannot recover() at the correct location. The reason for the design is (according to @hadley) that stat_smooth() may fail in some panels but not all and this should not throw an exception but simply not plot the layer in that panel.

This issue is to discuss whether we should move this responsibility down to each Stat and allow errors to bubble up in the expected way. I am (as may be clear) in favour of letting Stats fail clearly by default, but the change may very well be breaking in unexpected ways that we need to consider.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions