#[non_exhaustive]
pub enum JvmError {
NullOptString(String),
OptStringTooLong {
opt_string: String,
},
OptStringNotRepresentable {
opt_string: String,
},
OptStringTranscodeFailure {
opt_string: String,
error: Error,
},
}
Expand description
Errors that can occur when invoking a JavaVM
with the
Invocation API.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NullOptString(String)
InitArgsBuilder::option
or InitArgsBuilder::try_option
was used, but the supplied
string contains a U+0000 code point (except at the end).
This error is not raised if the string has a single U+0000 code point at the end.
InitArgsBuilder::option_encoded
never raises this error.
OptStringTooLong
Fields
This variant is marked as non-exhaustive
InitArgsBuilder::option
or InitArgsBuilder::try_option
was used, but the option
string is too long.
Currently, this error only occurs on Windows, where string length is limited to 1MB to
avoid overflow in WideCharToMultiByte
(see discussion). String length is not
currently limited (other than by available memory) on other platforms.
InitArgsBuilder::option_encoded
never raises this error, regardless of platform.
OptStringNotRepresentable
Fields
This variant is marked as non-exhaustive
InitArgsBuilder::option
or InitArgsBuilder::try_option
was used, but the option
string is not representable in the platform default character encoding.
InitArgsBuilder::option_encoded
never raises this error.
OptStringTranscodeFailure
Fields
This variant is marked as non-exhaustive
InitArgsBuilder::option
or InitArgsBuilder::try_option
was used, but the platform
reported an error converting it to its default character encoding.
InitArgsBuilder::option_encoded
never raises this error.