Skip to content

Commit

Permalink
error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
ajfriend committed Sep 27, 2024
1 parent 2dbb990 commit e167099
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/h3/_cy/cells.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ cpdef int64_t cell_to_child_pos(int parent_res, H3int child) except -1:
check_cell(child)
err = h3lib.cellToChildPos(child, parent_res, &child_pos)
if err:
msg = 'Invalid!' # TODO
# msg = msg.format(parent_res, hex(child))
msg = "Couldn't find child pos of cell {} at res {}."
msg = msg.format(hex(child), parent_res)
check_for_error_msg(err, msg)

return child_pos
Expand All @@ -229,8 +229,8 @@ cpdef H3int child_pos_to_cell(H3int parent, int child_res, int64_t child_pos) ex
check_cell(parent)
err = h3lib.childPosToCell(child_pos, parent, child_res, &child)
if err:
msg = 'Invalid!' # TODO
# msg = msg.format(parent_res, hex(child))
msg = "Couldn't find child with pos {} at res {} from parent {}."
msg = msg.format(child_pos, child_res, hex(parent))
check_for_error_msg(err, msg)

return child
Expand Down

0 comments on commit e167099

Please sign in to comment.