#![allow(clippy::needless_return)]
use trycatch::{throw, try_catch};
fn divide(x: u32, y: u32) -> u32 {
if y == 0 {
throw!("y cannot be zero");
}
return x / y;
}
fn main() {
try_catch! {
try {
divide(10, 0);
} catch (e) {
println!("Error: {e}");
}
};
}