diff options
author | Aaron Franke <arnfranke@yahoo.com> | 2023-12-02 00:44:59 -0600 |
---|---|---|
committer | Aaron Franke <arnfranke@yahoo.com> | 2023-12-02 00:44:59 -0600 |
commit | 7d5b9028383f16214e7e47d2e259c4f1958ad553 (patch) | |
tree | 177c7bfbd14f6710031fb73b938e4b655a72df45 /servers/rendering_server.cpp | |
parent | d76c1d0e516fedc535a2e394ab780cac79203477 (diff) | |
download | redot-engine-7d5b9028383f16214e7e47d2e259c4f1958ad553.tar.gz |
Add a descriptive error message when creating a mesh surface from arrays
Diffstat (limited to 'servers/rendering_server.cpp')
-rw-r--r-- | servers/rendering_server.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp index e84616a232..763989fdd4 100644 --- a/servers/rendering_server.cpp +++ b/servers/rendering_server.cpp @@ -1193,7 +1193,7 @@ Error RenderingServer::mesh_create_surface_data_from_arrays(SurfaceData *r_surfa array_len = v3.size(); } break; default: { - ERR_FAIL_V(ERR_INVALID_DATA); + ERR_FAIL_V_MSG(ERR_INVALID_DATA, "Vertex array must be a PackedVector2Array or PackedVector3Array."); } break; } ERR_FAIL_COND_V(array_len == 0, ERR_INVALID_DATA); @@ -1214,7 +1214,7 @@ Error RenderingServer::mesh_create_surface_data_from_arrays(SurfaceData *r_surfa } } break; default: { - ERR_FAIL_V(ERR_INVALID_DATA); + ERR_FAIL_V_MSG(ERR_INVALID_DATA, "Bones array must be a PackedInt32Array."); } break; } } else if (i == RS::ARRAY_INDEX) { |