@@ -83,7 +83,7 @@ H5RT_leaf_init(H5RT_leaf_t *leaf, int rank, void *record)
8383done :
8484 if (ret_value < 0 && leaf ) {
8585 if (H5RT_leaf_cleanup (leaf ) < 0 )
86- HDONE_ERROR (H5E_INTERNAL , H5E_CANTRELEASE , FAIL , "failed to clean up leaf on error ");
86+ HDONE_ERROR (H5E_RTREE , H5E_CANTRELEASE , FAIL , "failed to clean up leaf on error ");
8787 }
8888
8989 FUNC_LEAVE_NOAPI (ret_value )
@@ -196,14 +196,14 @@ H5RT__compute_slabs(size_t node_capacity, size_t leaf_count, size_t *slab_count_
196196 slab_size_d = ceil ((double )leaf_count / (double )node_capacity );
197197
198198 if (slab_size_d > (double )SIZE_MAX )
199- HGOTO_ERROR (H5E_INTERNAL , H5E_OVERFLOW , FAIL , "slab size overflows size_t ");
199+ HGOTO_ERROR (H5E_RTREE , H5E_OVERFLOW , FAIL , "slab size overflows size_t ");
200200 assert (slab_size_d > 0.0 );
201201 slab_size = (size_t )slab_size_d ;
202202 assert (slab_size > 0 );
203203
204204 num_slabs_d = ceil ((double )leaf_count / (double )slab_size );
205205 if (num_slabs_d > (double )SIZE_MAX )
206- HGOTO_ERROR (H5E_INTERNAL , H5E_OVERFLOW , FAIL , "number of slabs overflows size_t ");
206+ HGOTO_ERROR (H5E_RTREE , H5E_OVERFLOW , FAIL , "number of slabs overflows size_t ");
207207 assert (num_slabs_d > 0.0 );
208208 num_slabs = (size_t )num_slabs_d ;
209209 }
@@ -277,7 +277,7 @@ H5RT__result_set_grow(H5RT_result_set_t *result_set)
277277
278278 /* Overflow check */
279279 if (new_capacity < result_set -> capacity || new_capacity > (SIZE_MAX / sizeof (H5RT_leaf_t * )))
280- HGOTO_ERROR (H5E_INTERNAL , H5E_OVERFLOW , FAIL , "result buffer capacity overflow" );
280+ HGOTO_ERROR (H5E_RTREE , H5E_OVERFLOW , FAIL , "result buffer capacity overflow" );
281281
282282 /* Reallocate the buffer */
283283 new_results = (H5RT_leaf_t * * )realloc (result_set -> results , new_capacity * sizeof (H5RT_leaf_t * ));
@@ -313,7 +313,7 @@ H5RT__result_set_add(H5RT_result_set_t *result_set, H5RT_leaf_t *leaf)
313313 /* Grow buffer if full */
314314 if (result_set -> count >= result_set -> capacity ) {
315315 if (H5RT__result_set_grow (result_set ) < 0 )
316- HGOTO_ERROR (H5E_INTERNAL , H5E_CANTALLOC , FAIL , "failed to grow result buffer" );
316+ HGOTO_ERROR (H5E_RTREE , H5E_CANTALLOC , FAIL , "failed to grow result buffer" );
317317 }
318318
319319 /* Add the new result */
@@ -427,7 +427,7 @@ H5RT__bulk_load(H5RT_node_t *node, int rank, H5RT_leaf_t *leaves, size_t count,
427427 * 'child_leaf_count' */
428428 if (H5RT__bulk_load (node -> children .nodes [i ], rank , child_leaf_start , child_leaf_count , sort_dim ) <
429429 0 )
430- HGOTO_ERROR (H5E_INTERNAL , H5E_CANTINIT , FAIL , "failed to fill R-tree" );
430+ HGOTO_ERROR (H5E_RTREE , H5E_CANTINIT , FAIL , "failed to fill R-tree" );
431431
432432 /* The next 'child_leaf_count' leaves are now assigned */
433433 child_leaf_start += child_leaf_count ;
@@ -488,7 +488,7 @@ H5RT_create(int rank, H5RT_leaf_t *leaves, size_t count)
488488
489489 /* Populate the r-tree with nodes containing the provided leaves */
490490 if (H5RT__bulk_load (& rtree -> root , rank , rtree -> leaves , count , -1 ) < 0 )
491- HGOTO_ERROR (H5E_INTERNAL , H5E_CANTINIT , NULL , "failed to fill R-tree" );
491+ HGOTO_ERROR (H5E_RTREE , H5E_CANTINIT , NULL , "failed to fill R-tree" );
492492
493493 ret_value = rtree ;
494494
@@ -540,7 +540,7 @@ H5RT__search_recurse(H5RT_node_t *node, int rank, hsize_t min[], hsize_t max[],
540540 if (H5RT__leaves_intersect (rank , min , max , curr_min , curr_max )) {
541541 /* We found an intersecting leaf, add it to the result set */
542542 if (H5RT__result_set_add (result_set , curr_leaf ) < 0 )
543- HGOTO_ERROR (H5E_INTERNAL , H5E_CANTALLOC , FAIL , "failed to add result to result set" );
543+ HGOTO_ERROR (H5E_RTREE , H5E_CANTALLOC , FAIL , "failed to add result to result set" );
544544 }
545545 }
546546 else {
@@ -553,7 +553,7 @@ H5RT__search_recurse(H5RT_node_t *node, int rank, hsize_t min[], hsize_t max[],
553553 if (H5RT__leaves_intersect (rank , min , max , curr_min , curr_max )) {
554554 /* We found an intersecting internal node, recurse into it */
555555 if (H5RT__search_recurse (curr_node , rank , min , max , result_set ) < 0 )
556- HGOTO_ERROR (H5E_INTERNAL , H5E_CANTGET , FAIL , "recursive search failed" );
556+ HGOTO_ERROR (H5E_RTREE , H5E_CANTGET , FAIL , "recursive search failed" );
557557 }
558558 }
559559
@@ -597,11 +597,11 @@ H5RT_search(H5RT_t *rtree, hsize_t min[], hsize_t max[], H5RT_result_set_t **res
597597 HGOTO_ERROR (H5E_RESOURCE , H5E_CANTALLOC , FAIL , "failed to allocate result set" );
598598
599599 if (H5RT__result_set_init (result_set ) < 0 )
600- HGOTO_ERROR (H5E_INTERNAL , H5E_CANTINIT , FAIL , "failed to initialize result buffer" );
600+ HGOTO_ERROR (H5E_RTREE , H5E_CANTINIT , FAIL , "failed to initialize result buffer" );
601601
602602 /* Perform the actual search */
603603 if (H5RT__search_recurse (& rtree -> root , rtree -> rank , min , max , result_set ) < 0 )
604- HGOTO_ERROR (H5E_INTERNAL , H5E_CANTGET , FAIL , "search failed" );
604+ HGOTO_ERROR (H5E_RTREE , H5E_CANTGET , FAIL , "search failed" );
605605
606606 /* Don't cleanup result set on success - caller owns it now */
607607 * results_out = result_set ;
@@ -610,7 +610,7 @@ H5RT_search(H5RT_t *rtree, hsize_t min[], hsize_t max[], H5RT_result_set_t **res
610610 if (ret_value < 0 ) {
611611 /* Clean up buffer on failure */
612612 if (H5RT_free_results (result_set ) < 0 )
613- HDONE_ERROR (H5E_INTERNAL , H5E_CANTFREE , FAIL , "unable to free result set on error" );
613+ HDONE_ERROR (H5E_RTREE , H5E_CANTFREE , FAIL , "unable to free result set on error" );
614614 * results_out = NULL ;
615615 }
616616 FUNC_LEAVE_NOAPI (ret_value )
@@ -695,7 +695,7 @@ H5RT__node_copy(H5RT_node_t *dest_node, const H5RT_node_t *src_node, const H5RT_
695695 /* Recursively copy the child */
696696 if (H5RT__node_copy (dest_node -> children .nodes [i ], src_node -> children .nodes [i ], old_leaves_base ,
697697 new_leaves_base ) < 0 )
698- HGOTO_ERROR (H5E_INTERNAL , H5E_CANTCOPY , FAIL , "failed to copy child node" );
698+ HGOTO_ERROR (H5E_RTREE , H5E_CANTCOPY , FAIL , "failed to copy child node" );
699699 }
700700 }
701701
@@ -846,15 +846,15 @@ H5RT_copy(const H5RT_t *rtree)
846846
847847 /* Deep copy the root node structure */
848848 if (H5RT__node_copy (& new_tree -> root , & rtree -> root , rtree -> leaves , new_leaves ) < 0 )
849- HGOTO_ERROR (H5E_INTERNAL , H5E_CANTCOPY , NULL , "failed to copy r-tree structure" );
849+ HGOTO_ERROR (H5E_RTREE , H5E_CANTCOPY , NULL , "failed to copy r-tree structure" );
850850
851851 ret_value = new_tree ;
852852
853853done :
854854 if (!ret_value ) {
855855 if (new_tree ) {
856856 if (H5RT_free (new_tree ) < 0 )
857- HDONE_ERROR (H5E_INTERNAL , H5E_CANTFREE , NULL , "unable to free partially copied r-tree" );
857+ HDONE_ERROR (H5E_RTREE , H5E_CANTFREE , NULL , "unable to free partially copied r-tree" );
858858 }
859859 else if (new_leaves ) {
860860 /* Free copied leaves and their coordinates */
0 commit comments