The PALISADE library will throw a palisade_error exception in the event of certain unrecoverable errors. palisade_error is a subclass of std::exception.
The library actually throws an exception which is a subclass of palisade_error.
Exceptions and the methods associated with them are defined in src/core/lib/utils/exception.h
The available exceptions are as follows
This exception is thrown whenever the user of the library supplies configuration parameters that cannot be used to configure PALISADE. An example of this would be providing a ciphertext modulus that is not a prime number, or providing a plaintext modulus that cannot be used with a particular encoding type.
This exception is thrown whenever a math error occurs during the operation of the library. An example of this would be an overflow.
This exception is thrown whenever a fatal serialization error occurs. For example, if a required field is missing, this exception is thrown.
This exception is thrown if a method is unimplemented. An example of this is a circumstance where a default implementation is provided in a base class, but an overridden exception is not provided in the derived class.
This exception is thrown if a method is not available for a given configuration. For example, an arbitrary cyclotomics method is not available for a power-of-2 configuration.
Throwing Exceptions in PALISADE
Programmers use an inline method in exception.h to generate the appropriate exception.
Available methods in palisade_exception
Each exception includes the filename and line number at which the exception was thrown as well as a message.