Skip to content

Commit 2d4f81c

Browse files
rw-vancIsaacWoods
authored andcommitted
add Unimplmented error code
1 parent dc6c8f9 commit 2d4f81c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

aml/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,9 @@ pub enum AmlError {
796796
TypeCannotBeSliced(AmlType),
797797
TypeCannotBeWrittenToBufferField(AmlType),
798798
BufferFieldIndexesOutOfBounds,
799+
800+
/// Unimplemented functionality - return error rather than abort
801+
Unimplemented,
799802
}
800803

801804
#[cfg(test)]

aml/src/term_object.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -868,9 +868,8 @@ where
868868
if let Ok((_name, _handle)) = handle {
869869
match target {
870870
Target::Null => { /* just return the result of the check */ }
871-
_ => todo!(),
871+
_ => {return (Err(Propagate::Err(AmlError::Unimplemented)), context) },
872872
}
873-
874873
}
875874
(Ok(result), context)
876875
}),

0 commit comments

Comments
 (0)