diff --git a/dotnet/src/Decryptor.cs b/dotnet/src/Decryptor.cs
index 7ab3fa5f..75a3f98b 100644
--- a/dotnet/src/Decryptor.cs
+++ b/dotnet/src/Decryptor.cs
@@ -103,7 +103,7 @@ namespace Microsoft.Research.SEAL
///
/// The ciphertext
/// if encrypted is null
- /// if the scheme is not BFV or BGV
+ /// if the scheme is not BFV or BGV
/// if encrypted is not valid for the encryption parameters
/// if encrypted is in NTT form
/// if pool is uninitialized
diff --git a/native/src/seal/c/decryptor.cpp b/native/src/seal/c/decryptor.cpp
index 18ec8484..257784df 100644
--- a/native/src/seal/c/decryptor.cpp
+++ b/native/src/seal/c/decryptor.cpp
@@ -78,4 +78,8 @@ SEAL_C_FUNC Decryptor_InvariantNoiseBudget(void *thisptr, void *encrypted, int *
{
return E_INVALIDARG;
}
+ catch (const logic_error &)
+ {
+ return COR_E_INVALIDOPERATION;
+ }
}
diff --git a/native/src/seal/decryptor.h b/native/src/seal/decryptor.h
index d77d2979..90c73573 100644
--- a/native/src/seal/decryptor.h
+++ b/native/src/seal/decryptor.h
@@ -82,9 +82,9 @@ namespace seal
@par Invariant Noise Budget
The invariant noise polynomial of a ciphertext is a rational coefficient
polynomial, such that a ciphertext decrypts correctly as long as the
- coefficients of the invariantnoise polynomial are of absolute value less
+ coefficients of the invariant noise polynomial are of absolute value less
than 1/2. Thus, we call the infinity-norm of the invariant noise polynomial
- the invariant noise, and for correct decryption requireit to be less than
+ the invariant noise, and for correct decryption require it to be less than
1/2. If v denotes the invariant noise, we define the invariant noise budget
as -log2(2v). Thus, the invariant noise budget starts from some initial
value, which depends on the encryption parameters, and decreases when
@@ -92,7 +92,7 @@ namespace seal
becomes too noisy to decrypt correctly.
@param[in] encrypted The ciphertext
- @throws std::invalid_argument if the scheme is not BFV/BGV
+ @throws std::logic_error if the scheme is not BFV/BGV
@throws std::invalid_argument if encrypted is not valid for the encryption
parameters
@throws std::invalid_argument if encrypted is in NTT form