pub fn throw(self) -> Result<()> {
        match self.object {
            Some(object) => throw_object(object),
            None => throw_with_code(self.ex, self.code, &self.message),
        }
    }
Throws the exception, returning nothing inside a result if successful
and an error otherwise.

# Errors

* [`Error::InvalidException`] - If the exception type is an interface or
abstract class.
* If the message contains NUL bytes.
src/exception.rs