Skip to content

Commit 442edc3

Browse files
authored
Accept more Status codes in get_property. (#237)
Signed-off-by: Alex Snaps <[email protected]>
1 parent 89b48bd commit 442edc3

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

Diff for: src/hostcalls.rs

+2
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,8 @@ pub fn get_property(path: Vec<&str>) -> Result<Option<Bytes>, Status> {
416416
}
417417
}
418418
Status::NotFound => Ok(None),
419+
Status::SerializationFailure => Err(Status::SerializationFailure),
420+
Status::InternalFailure => Err(Status::InternalFailure),
419421
status => panic!("unexpected status: {}", status as u32),
420422
}
421423
}

Diff for: src/types.rs

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ pub enum Status {
4444
Ok = 0,
4545
NotFound = 1,
4646
BadArgument = 2,
47+
SerializationFailure = 3,
4748
ParseFailure = 4,
4849
Empty = 7,
4950
CasMismatch = 8,

0 commit comments

Comments
 (0)