Skip to content

Commit

Permalink
Throw errors if unsupported
Browse files Browse the repository at this point in the history
  • Loading branch information
franzpoeschel committed Jan 9, 2024
1 parent 8f606c5 commit e86addc
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/IO/ADIOS/ADIOS2IOHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,13 @@ void ADIOS2IOHandlerImpl::createDataset(
"[ADIOS2] Creating a dataset in a file opened as read "
"only is not possible.");
}
#if !openPMD_HAS_ADIOS_2_9
if (parameters.joinedDimension.has_value())
{
error::throwOperationUnsupportedInBackend(
"ADIOS1", "Joined Arrays require ADIOS2 >= v2.9");
}
#endif
if (!writable->written)
{
/* Sanitize name */
Expand Down
6 changes: 6 additions & 0 deletions src/IO/HDF5/HDF5IOHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,12 @@ void HDF5IOHandlerImpl::createDataset(
"[HDF5] Creating a dataset in a file opened as read only is not "
"possible.");

if (parameters.joinedDimension.has_value())
{
error::throwOperationUnsupportedInBackend(
"ADIOS1", "Joined Arrays currently only supported in ADIOS2");
}

if (!writable->written)
{
/* Sanitize name */
Expand Down
6 changes: 6 additions & 0 deletions src/IO/JSON/JSONIOHandlerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,12 @@ void JSONIOHandlerImpl::createDataset(
"[JSON] Creating a dataset in a file opened as read only is not "
"possible.");
}
if (parameter.joinedDimension.has_value())
{
error::throwOperationUnsupportedInBackend(
"ADIOS1", "Joined Arrays currently only supported in ADIOS2");
}

if (!writable->written)
{
/* Sanitize name */
Expand Down

0 comments on commit e86addc

Please sign in to comment.