Skip to content

Commit

Permalink
Merge pull request #85646 from aaronfranke/mesh-surf-arr-msg
Browse files Browse the repository at this point in the history
Add a descriptive error message when creating a mesh surface from the wrong array type
  • Loading branch information
akien-mga committed Dec 4, 2023
2 parents 4c3d95e + 7d5b902 commit 7b2b408
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions servers/rendering_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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) {
Expand Down

0 comments on commit 7b2b408

Please sign in to comment.