Add throws declaration to Serializables when deserializing.