Skip to content

Update force casts and force unwraps in backend impls to print custom messages on failure #248

@stackotter

Description

@stackotter

At the moment the force casts and force unwraps print relatively generic messages when they cause fatal errors. We should probably replace the force casts and force unwraps with helper methods that use #function, #line, and Self to emit nicer fatal error messages

Here's one idea for a way we could format the messages,

Fatal(AppKitBackend): NSTextView is not NSButton (`updateButton(_:label:environment:action:)`, line 593)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions