---
source: crates/aviutl2-macros/src/generic_menus.rs
assertion_line: 499
expression: format_tokens(output)
---
impl MyPlugin {
    fn object_item_menu(
        &mut self,
        object: ::aviutl2::generic::ObjectHandle,
        effect: &str,
        index: usize,
        item: &str,
    ) -> Result<(), ()> {
        let _ = (object, effect, index, item);
        Ok(())
    }
}
::aviutl2::__internal_module! {
    impl ::aviutl2::generic::GenericPluginMenus for MyPlugin {
        fn register_menus(host: &mut ::aviutl2::generic::HostAppHandle) {
            host.register_object_item_menu("ObjectItem", bridge_object_item_menu);
            return;
            fn bridge_object_item_menu(
                object_handle: ::aviutl2::generic::ObjectHandle,
                effect_name: &str,
                effect_index: usize,
                item_name: &str,
            ) {
                if let Err(panic_info) = ::aviutl2::__catch_unwind_with_panic_info(|| {
                    <MyPlugin as ::aviutl2::generic::GenericPlugin>::with_instance_mut(|__self| {
                        let ret = <MyPlugin>::object_item_menu(
                            __self,
                            object_handle,
                            effect_name,
                            effect_index,
                            item_name,
                        );
                        ::aviutl2::common::__log_and_beep_if_error(ret);
                    });
                }) {
                    ::aviutl2::tracing::error!(
                        "Panic occurred during {}: {}",
                        "object_item_menu",
                        panic_info
                    );
                }
            }
        }
    }
}
