Skip to content

Commit

Permalink
Remove unnecessary catch-all error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
XuJiandong committed Sep 24, 2024
1 parent 8e2e80f commit 4e2db00
Show file tree
Hide file tree
Showing 11 changed files with 1 addition and 10 deletions.
1 change: 0 additions & 1 deletion contracts/ckb-std-tests/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ impl From<SysError> for Error {
MaxVmsSpawned => Self::MaxVmsSpawned,
MaxFdsCreated => Self::MaxFdsCreated,
Unknown(err_code) => panic!("unexpected sys error {}", err_code),
_ => panic!("other sys error"),
}
}
}
1 change: 0 additions & 1 deletion contracts/exec-callee/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ impl From<SysError> for Error {
MaxVmsSpawned => Self::MaxVmsSpawned,
MaxFdsCreated => Self::MaxFdsCreated,
Unknown(err_code) => panic!("unexpected sys error {}", err_code),
_ => panic!("other sys error"),
}
}
}
1 change: 0 additions & 1 deletion contracts/exec-caller-by-code-hash/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ impl From<SysError> for Error {
MaxVmsSpawned => Self::MaxVmsSpawned,
MaxFdsCreated => Self::MaxFdsCreated,
Unknown(err_code) => panic!("unexpected sys error {}", err_code),
_ => panic!("other sys error"),
}
}
}
1 change: 0 additions & 1 deletion contracts/exec-caller/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ impl From<SysError> for Error {
MaxVmsSpawned => Self::MaxVmsSpawned,
MaxFdsCreated => Self::MaxFdsCreated,
Unknown(err_code) => panic!("unexpected sys error {}", err_code),
_ => panic!("other sys error"),
}
}
}
1 change: 0 additions & 1 deletion contracts/spawn-callee/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ impl From<SysError> for Error {
MaxVmsSpawned => Self::MaxVmsSpawned,
MaxFdsCreated => Self::MaxFdsCreated,
Unknown(err_code) => panic!("unexpected sys error {}", err_code),
_ => panic!("other sys error"),
}
}
}
1 change: 0 additions & 1 deletion contracts/spawn-caller-by-code-hash/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ impl From<SysError> for Error {
MaxVmsSpawned => Self::MaxVmsSpawned,
MaxFdsCreated => Self::MaxFdsCreated,
Unknown(err_code) => panic!("unexpected sys error {}", err_code),
_ => panic!("other sys error"),
}
}
}
1 change: 0 additions & 1 deletion contracts/spawn-caller/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ impl From<SysError> for Error {
MaxVmsSpawned => Self::MaxVmsSpawned,
MaxFdsCreated => Self::MaxFdsCreated,
Unknown(err_code) => panic!("unexpected sys error {}", err_code),
_ => panic!("other sys error"),
}
}
}
1 change: 1 addition & 0 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ pub enum SysError {
/// Max fds has been spawned. Its value is 9.
MaxFdsCreated,
/// Type ID Error
#[cfg(feature = "type-id")]
TypeIDError,
/// Unknown syscall error number
Unknown(u64),
Expand Down
1 change: 0 additions & 1 deletion test/simulator/src/exec_callee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ pub mod error {
MaxVmsSpawned => Self::MaxVmsSpawned,
MaxFdsCreated => Self::MaxFdsCreated,
Unknown(err_code) => panic!("unexpected sys error {}", err_code),
_ => panic!("other sys error"),
}
}
}
Expand Down
1 change: 0 additions & 1 deletion test/simulator/src/exec_caller_by_code_hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ pub mod error {
MaxVmsSpawned => Self::MaxVmsSpawned,
MaxFdsCreated => Self::MaxFdsCreated,
Unknown(err_code) => panic!("unexpected sys error {}", err_code),
_ => panic!("other sys error"),
}
}
}
Expand Down
1 change: 0 additions & 1 deletion test/simulator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ pub mod error {
MaxVmsSpawned => Self::MaxVmsSpawned,
MaxFdsCreated => Self::MaxFdsCreated,
Unknown(err_code) => panic!("unexpected sys error {}", err_code),
_ => panic!("other sys error"),
}
}
}
Expand Down

0 comments on commit 4e2db00

Please sign in to comment.