mirror of
https://github.com/lune-org/lune.git
synced 2025-05-04 10:43:57 +01:00
Prefix enums in errors with Enum.
Co-authored-by: Filip Tibell <filip.tibell@gmail.com>
This commit is contained in:
parent
e8cf4ddd59
commit
85203d754f
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue