Skip to content

Commit 7f8beb1

Browse files
authored
throw on reading oldms files (#436)
1 parent 21afc7f commit 7f8beb1

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/odr/internal/oldms/oldms_file.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,13 @@ EncryptionState LegacyMicrosoftFile::encryption_state() const noexcept {
8080
std::shared_ptr<abstract::DecodedFile>
8181
LegacyMicrosoftFile::decrypt(const std::string &password) const {
8282
(void)password;
83-
return {}; // TODO throw
83+
throw UnsupportedOperation(
84+
"odrcore does not support decryption of legacy Microsoft files");
8485
}
8586

8687
std::shared_ptr<abstract::Document> LegacyMicrosoftFile::document() const {
87-
return {}; // TODO throw
88+
throw UnsupportedOperation(
89+
"odrcore does not support reading legacy Microsoft files");
8890
}
8991

9092
} // namespace odr::internal::oldms

0 commit comments

Comments
 (0)