summaryrefslogtreecommitdiff
path: root/src/exceptions.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/exceptions.rs')
-rw-r--r--src/exceptions.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/exceptions.rs b/src/exceptions.rs
index 5e3f02f..6bc21f2 100644
--- a/src/exceptions.rs
+++ b/src/exceptions.rs
@@ -31,6 +31,15 @@ pub enum ExceptionType {
HardwareError = 19,
}
+impl ExceptionType {
+ pub fn with_no_value(self) -> Exception {
+ Exception {
+ type_: self,
+ value: 0,
+ }
+ }
+}
+
#[derive(Debug, Clone, Copy)]
pub struct Exception {
pub type_: ExceptionType,