Skip to content

Commit 7e598b2

Browse files
committed
Don't panic on SerializationFailure | InternalFailure while getting property
Signed-off-by: Alex Snaps <[email protected]>
1 parent 427bea0 commit 7e598b2

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/hostcalls.rs

Lines changed: 2 additions & 0 deletions
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
}

src/types.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,9 @@ pub enum Status {
4646
BadArgument = 2,
4747
SerializationFailure = 3,
4848
ParseFailure = 4,
49-
BadExpression = 5,
50-
InvalidMemoryAccess = 6,
5149
Empty = 7,
5250
CasMismatch = 8,
53-
ResultMismatch = 9,
5451
InternalFailure = 10,
55-
BrokenConnection = 11,
56-
Unimplemented = 12,
5752
}
5853

5954
#[repr(u32)]

0 commit comments

Comments
 (0)