Agreed, wrong exception type. But if the DocumentType - enumeration is extended in the future, one might forget that it has to be handled here. Even thogh the default case should never occur at the moment, one can not conclude that it will never occur at all.