diff --git a/libtiledbsoma/src/soma/soma_object.cc b/libtiledbsoma/src/soma/soma_object.cc index 2a4eea25fd..8765f111e3 100644 --- a/libtiledbsoma/src/soma/soma_object.cc +++ b/libtiledbsoma/src/soma/soma_object.cc @@ -46,8 +46,8 @@ std::unique_ptr SOMAObject::open( auto array_type = array_->type(); if (!array_type.has_value()) - throw TileDBSOMAError( - "[SOMAObject::open] SOMAArray has no type info"); + throw TileDBSOMAError(std::format( + "[SOMAObject::open] SOMAArray '{}' has no type info", uri)); std::transform( array_type->begin(), @@ -74,8 +74,8 @@ std::unique_ptr SOMAObject::open( auto group_type = group_->type(); if (!group_type.has_value()) - throw TileDBSOMAError( - "[SOMAObject::open] SOMAGroup has no type info"); + throw TileDBSOMAError(std::format( + "[SOMAObject::open] SOMAGroup '{}' has no type info", uri)); std::transform( group_type->begin(),