I’ve often seen assertions throw exceptions when violated. Users don’t catch exceptions, developers do. Users interact with the software through things like failure pop ups. You’d need to check that there’s a failure to show one, hence returning a Result to represent the success/fail state.

With users I meant library users, not end users.

> You’d need to check that there’s a failure to show one

You can do this with either exceptions or Result types. At the end of the day, it is a matter of culture and personal preference.