Timeline for Is throwing an error in unpredictable subclass-specific circumstances a violation of LSP?
Current License: CC BY-SA 3.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 10, 2014 at 12:13 | comment | added | Doval | @Arian It'd be better to not conflate lists with database access. They have nothing to do with each other. | |
Nov 11, 2013 at 18:14 | history | edited | jmoreno | CC BY-SA 3.0 |
Expanded answer in response to comments
|
Nov 10, 2013 at 20:16 | comment | added | Cephalopod | +1 don't worry too much about the LSP. The additional exception is truly exceptional, ie, there is nothing the client code can do anyway. Certainly don't make your code more complicated just because of this. If you really really must (I add this only for completeness), you have another option: throw a (subtype of) error, any error may occur at any time. | |
Nov 10, 2013 at 17:31 | history | answered | jmoreno | CC BY-SA 3.0 |