Translate asset and archive parity tests
This commit is contained in:
@@ -51,6 +51,8 @@ pub enum Error {
|
||||
ArgumentNull,
|
||||
/// An argument value or length was invalid.
|
||||
Argument,
|
||||
/// The requested operation is invalid in the current object state.
|
||||
InvalidOperation,
|
||||
/// An index or destination buffer boundary was exceeded.
|
||||
IndexOutOfRange,
|
||||
/// An operation observed a requested cancellation.
|
||||
@@ -63,7 +65,11 @@ impl Error {
|
||||
pub const fn csharp_member(self) -> Option<&'static str> {
|
||||
match self {
|
||||
Self::NotImplemented(error) => Some(error.csharp_member()),
|
||||
Self::ArgumentNull | Self::Argument | Self::IndexOutOfRange | Self::Cancelled => None,
|
||||
Self::ArgumentNull
|
||||
| Self::Argument
|
||||
| Self::InvalidOperation
|
||||
| Self::IndexOutOfRange
|
||||
| Self::Cancelled => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -80,6 +86,9 @@ impl fmt::Display for Error {
|
||||
Self::NotImplemented(error) => error.fmt(formatter),
|
||||
Self::ArgumentNull => formatter.write_str("required argument was null"),
|
||||
Self::Argument => formatter.write_str("argument was invalid"),
|
||||
Self::InvalidOperation => {
|
||||
formatter.write_str("operation was invalid for the current state")
|
||||
}
|
||||
Self::IndexOutOfRange => formatter.write_str("index was out of range"),
|
||||
Self::Cancelled => formatter.write_str("operation was cancelled"),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user