Skip to main content

ai_agent/utils/
errors.rs

1// Source: /data/home/swei/claudecode/openclaudecode/src/utils/errors.ts
2pub fn error_message(error: &dyn std::error::Error) -> String {
3    error.to_string()
4}
5
6pub fn to_error<T: std::fmt::Display + Sized>(err: T) -> String {
7    err.to_string()
8}
9
10pub fn is_enoent(error: &str) -> bool {
11    error.contains("No such file")
12}