|
|
|
|
|
by im3w1l
1720 days ago
|
|
I 95% agree with you. But I think it's just slightly more nuanced. If you tell FooLibrary to open a FooFile, then throwing FileNotFoundException is acceptable to signal that that file is not found. In a sense it's just passing along an exception that was meant for you. On the other hand, if FooLibrary tries to read some config file or fetch metadata over the internet, then that's a sort of detail that it shouldn't bother the caller with. It should either handle the exception or translate it to a FooException. |
|