We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 447f892 commit a2a5c01Copy full SHA for a2a5c01
derive/src/impl_attribute.rs
@@ -71,9 +71,12 @@ pub fn godot_script_impl(
71
72
quote_spanned! {
73
arg.span() =>
74
- #godot_types::prelude::FromGodot::from_variant(
+ #godot_types::prelude::FromGodot::try_from_variant(
75
args.get(#index).ok_or(#godot_types::sys::GDEXTENSION_CALL_ERROR_TOO_FEW_ARGUMENTS)?
76
- )
+ ).map_err(|err| {
77
+ #godot_types::log::godot_error!("failed to convert variant: {}", err);
78
+ #godot_types::sys::GDEXTENSION_CALL_ERROR_INVALID_ARGUMENT
79
+ })?
80
}
81
)
82
})
0 commit comments