Skip to content

Error message for invalid IS method prints function body instead of method names #331

@ishaan-arora-1

Description

@ishaan-arora-1

When passing an invalid importance sampling method directly to importance_sampling(), the error message is garbled because assert_importance_sampling_method_is_implemented() passes the function object implemented_is_methods to paste0() instead of calling implemented_is_methods().

Current output:

Error: Importance sampling method 'foo' is not implemented. Implemented methods: 'function () \nc("psis", "tis", "sis")'

Expected output:

Error: Importance sampling method 'foo' is not implemented. Implemented methods: 'psis', 'tis', 'sis'

The fix is a missing pair of parentheses on line 117 of R/importance_sampling.R.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions