Prefix enums in errors with Enum.

Co-authored-by: Filip Tibell <filip.tibell@gmail.com>
This commit is contained in:
Kenneth Loeffler 2023-08-24 16:32:40 -07:00 committed by GitHub
parent e8cf4ddd59
commit 85203d754f
Signed by: DevComp
GPG key ID: 4AEE18F83AFDEB23

View file

@ -74,7 +74,7 @@ fn terrain_get_material_color(_: &Lua, this: &Instance, material: EnumItem) -> L
if &material.parent.desc.name != "Material" { if &material.parent.desc.name != "Material" {
return Err(LuaError::RuntimeError(format!( return Err(LuaError::RuntimeError(format!(
"Expected Material, got {}", "Expected Enum.Material, got Enum.{}",
&material.parent.desc.name &material.parent.desc.name
))); )));
} }
@ -107,7 +107,7 @@ fn terrain_set_material_color(
if &material.parent.desc.name != "Material" { if &material.parent.desc.name != "Material" {
return Err(LuaError::RuntimeError(format!( return Err(LuaError::RuntimeError(format!(
"Expected Material, got {}", "Expected Enum.Material, got Enum.{}",
&material.parent.desc.name &material.parent.desc.name
))); )));
} }