Implement Display for GodotError
@@ -72,3 +72,12 @@ impl GodotError {
Err(std::mem::transmute(err as u32))
}
}
+
+impl std::fmt::Display for GodotError {
+ #[inline]
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ write!(f, "Godot API error: {:?}", self)
+ }
+}
+
+impl std::error::Error for GodotError {}
