Skip to content

Commit cb0518a

Browse files
committed
Throw errors if unsupported
1 parent 3ab05be commit cb0518a

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

src/IO/ADIOS/ADIOS2IOHandler.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,13 @@ void ADIOS2IOHandlerImpl::createDataset(
702702
"[ADIOS2] Creating a dataset in a file opened as read "
703703
"only is not possible.");
704704
}
705+
#if !openPMD_HAS_ADIOS_2_9
706+
if (parameters.joinedDimension.has_value())
707+
{
708+
error::throwOperationUnsupportedInBackend(
709+
"ADIOS1", "Joined Arrays require ADIOS2 >= v2.9");
710+
}
711+
#endif
705712
if (!writable->written)
706713
{
707714
/* Sanitize name */

src/IO/HDF5/HDF5IOHandler.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,12 @@ void HDF5IOHandlerImpl::createDataset(
452452
"[HDF5] Creating a dataset in a file opened as read only is not "
453453
"possible.");
454454

455+
if (parameters.joinedDimension.has_value())
456+
{
457+
error::throwOperationUnsupportedInBackend(
458+
"ADIOS1", "Joined Arrays currently only supported in ADIOS2");
459+
}
460+
455461
if (!writable->written)
456462
{
457463
/* Sanitize name */

src/IO/JSON/JSONIOHandlerImpl.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,12 @@ void JSONIOHandlerImpl::createDataset(
260260
"[JSON] Creating a dataset in a file opened as read only is not "
261261
"possible.");
262262
}
263+
if (parameter.joinedDimension.has_value())
264+
{
265+
error::throwOperationUnsupportedInBackend(
266+
"ADIOS1", "Joined Arrays currently only supported in ADIOS2");
267+
}
268+
263269
if (!writable->written)
264270
{
265271
/* Sanitize name */

0 commit comments

Comments
 (0)