I noticed some work was done on exceptions in SMW recently - nice :)

A few thoughts on how it can be further improved:

Right now they all derive from MWException, not sure what good this does. This creates binding to MW all over the place, while this is probably not needed anywhere.

At least for DataItems, special "DataItemException" are thrown for any kind of error in those classes. While most of those errors seem to be either input issues, where usage of InvalidArgumentException would be better, or deserialization issue, for which a dedicated DataItemDeserializationException might be more appropriate. For instance, this later one could have an extra field that holds the invalid serialization (would be awkward to just stuff this into the exception message).


Jeroen De Dauw
Don't panic. Don't be evil. ~=[,,_,,]:3