|
|
|
|
|
by lmm
22 days ago
|
|
> You've never seen a try that has more than 1 catch block for different exception types? I've seen it for APIs that throw exceptions for bad input or whatever. But what I've never seen is more than one catch block for wrapper exceptions (except perhaps to unwrap the cause), where the calling code handles FrameworkNetworkError differently from FrameworkDatabaseError or what have you. > Do you think bad user input should be a result type? Yes > Because exceptions are essentially the same thing. Well, except for all the ways they're not that you mentioned in the following paragraphs. |
|