Most modern mainstream programming languages use exceptions to ensure that exceptional cases are not ignored. But not all errors your software has to handle are truly exceptional. So how can we handle those in an elegant way?
I like to think about exceptions like this: “Exceptions are only to communicate with developers(or more generally maintainers of the application) NOT users” Do you think that’s a good rule?
I see exceptions more for unexpected errors that we can't possible can recover from like hardware failures that prevent the application from functioning. All errors that we can possibly recover from by retrying or letting the user decide are better treated like part of the result and communicated in the function signature.