{"record":{"id":"b156b8a4a50d85a0","repo":"bevyengine/bevy","slug":"a-function-has-already-been-registered-with-name","errorCode":null,"errorMessage":"a function has already been registered with name {0:?}","messagePattern":"a function has already been registered with name (.+?)","errorType":"exception","errorClass":"FunctionRegistrationError","httpStatus":null,"severity":"error","filePath":"crates/bevy_reflect/src/func/error.rs","lineNumber":76,"sourceCode":"    ///\n    /// [`ArgCount::MAX_COUNT`]: crate::func::args::ArgCount\n    #[error(\n        \"argument signature `{:?}` has too many arguments (max {})\",\n        0,\n        ArgCount::MAX_COUNT\n    )]\n    TooManyArguments(ArgumentSignature),\n}\n\n/// An error that occurs when registering a function into a [`FunctionRegistry`].\n///\n/// [`FunctionRegistry`]: crate::func::FunctionRegistry\n#[derive(Debug, Error, PartialEq)]\npub enum FunctionRegistrationError {\n    /// A function with the given name has already been registered.\n    ///\n    /// Contains the duplicate function name.\n    #[error(\"a function has already been registered with name {0:?}\")]\n    DuplicateName(Cow<'static, str>),\n    /// The function is missing a name by which it can be registered.\n    #[error(\"function name is missing\")]\n    MissingName,\n}\n","sourceCodeStart":58,"sourceCodeEnd":82,"githubUrl":"https://github.com/bevyengine/bevy/blob/396ca727080776bd313bb892423b7d94e03b81b4/crates/bevy_reflect/src/func/error.rs#L58-L82","documentation":"FunctionRegistrationError::DuplicateName — FunctionRegistry::register found that a function with the same name (payload) was already registered. Rename the function or overwrite/remove the existing registration.","triggerScenarios":"Thrown at crates/bevy_reflect/src/func/error.rs:76 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Choose a unique function name","Remove or replace the previously registered function first","Namespaced names (e.g. my_mod::func) help avoid collisions"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"396ca727080776bd313bb892423b7d94e03b81b4","analyzedAt":"2026-08-20T16:12:39.808Z","contentChangedAt":"2026-08-20T16:12:39.808Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}