other => {
ext_php_rs::exception::PhpException::default(format!(
"invalid value {other:?} for field '{{ field_name }}' of {{ enum_name }}: expected one of [{{ valid_variants }}]"
))
.throw()
.expect("failed to throw PHP exception for invalid enum string value");
{{ fallback_expr }}
}