Skip to content

Commit

Permalink
review error handler
Browse files Browse the repository at this point in the history
  • Loading branch information
ityuany committed Aug 2, 2024
1 parent b75b0b3 commit 4c63525
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions crates/snm_utils/src/snm_error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,21 +351,7 @@ pub fn hack(error: SnmError) {
}

SnmError::SNMBinaryProxyFail { stderr: _ } => {
let message = format!(
r##"
错误: snm 二进制代理失败
方案:
阅读错误日志,查看其他错误
解释:
通常这是由其他错误引起的,并不是直接性的错误原因,你可以查看错误日志,查看其他错误。
注意:
"##,
);
eprintln!("{}", message);
// Don't do anything.
}

SnmError::HttpStatusCodeUnOk
Expand Down Expand Up @@ -408,7 +394,7 @@ pub fn friendly_error_message(error: SnmError) {

match error {
SnmError::SNMBinaryProxyFail { stderr: _ } => {
// TODO 🤔 how to show ?
// Don't do anything.
}
SnmError::NoDefaultNodeBinary => {
let message = create_error_message(
Expand Down

0 comments on commit 4c63525

Please sign in to comment.