Throw if variable error indicates an error. The exception message is set to contain the error from libgcrypt.
Throw if len != expected, with exception message explaining the issue.
Mixin the reusable exception parts
Throws a new instance of this class if error indicates an error. The exception message is set to contain the error from libgcrypt.
Reusable exception class