Skip to content

Reconsider throwing from property getters #1308

@TartanLlama

Description

@TartanLlama

In some cases, e.g. #1306, property getters throw exceptions in places where it may be surprising to users. We should reconsider where and when we do this.

I think it's reasonable to throw an exception for errors that are outwith API contracts, but within reasonable use, property getters should return null instead of throwing on error. If the error information is important, those properties should be functions instead.

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