Skip to content

Commit 6222756

Browse files
committed
make array setter type error message clearer
1 parent a6040da commit 6222756

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/unrealsdk/unreal/classes/properties/uarrayproperty.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ void PropTraits<UArrayProperty>::set(const UArrayProperty* prop,
3737
"Array has static array inner property - unsure how to handle, aborting!");
3838
}
3939
if (value.type != inner) {
40-
throw std::runtime_error("Array does not contain fields of type "
41-
+ (std::string)inner->Name);
40+
throw std::runtime_error(utils::narrow(
41+
unrealsdk::fmt::format(L"Array fields have incompatible type, expected {}, got {}",
42+
inner->get_path_name(), value.type->get_path_name())));
4243
}
4344

4445
auto arr = reinterpret_cast<TArray<void>*>(addr);

0 commit comments

Comments
 (0)