2121#pragma once
2222
2323#include " openPMD/IO/ADIOS/ADIOS1FilePosition.hpp"
24+ #include " openPMD/ThrowError.hpp"
2425#include " openPMD/auxiliary/StringManip.hpp"
2526#include " openPMD/backend/Attribute.hpp"
2627#include " openPMD/backend/Writable.hpp"
@@ -102,8 +103,8 @@ inline ADIOS_DATATYPES getBP1DataType(Datatype dtype)
102103 else if (sizeof (long ) == 8u )
103104 return adios_long;
104105 else
105- throw unsupported_data_error (
106- " No native equivalent for Datatype::SHORT found." );
106+ error::throwOperationUnsupportedInBackend (
107+ " ADIOS1 " , " No native equivalent for Datatype::SHORT found." );
107108 case DT::INT:
108109 case DT::VEC_INT:
109110 if (sizeof (int ) == 2u )
@@ -113,8 +114,8 @@ inline ADIOS_DATATYPES getBP1DataType(Datatype dtype)
113114 else if (sizeof (int ) == 8u )
114115 return adios_long;
115116 else
116- throw unsupported_data_error (
117- " No native equivalent for Datatype::INT found." );
117+ error::throwOperationUnsupportedInBackend (
118+ " ADIOS1 " , " No native equivalent for Datatype::INT found." );
118119 case DT::LONG:
119120 case DT::VEC_LONG:
120121 if (sizeof (long ) == 2u )
@@ -124,8 +125,8 @@ inline ADIOS_DATATYPES getBP1DataType(Datatype dtype)
124125 else if (sizeof (long ) == 8u )
125126 return adios_long;
126127 else
127- throw unsupported_data_error (
128- " No native equivalent for Datatype::LONG found." );
128+ error::throwOperationUnsupportedInBackend (
129+ " ADIOS1 " , " No native equivalent for Datatype::LONG found." );
129130 case DT::LONGLONG:
130131 case DT::VEC_LONGLONG:
131132 if (sizeof (long long ) == 2u )
@@ -135,8 +136,8 @@ inline ADIOS_DATATYPES getBP1DataType(Datatype dtype)
135136 else if (sizeof (long long ) == 8u )
136137 return adios_long;
137138 else
138- throw unsupported_data_error (
139- " No native equivalent for Datatype::LONGLONG found." );
139+ error::throwOperationUnsupportedInBackend (
140+ " ADIOS1 " , " No native equivalent for Datatype::LONGLONG found." );
140141 case DT::USHORT:
141142 case DT::VEC_USHORT:
142143 if (sizeof (unsigned short ) == 2u )
@@ -146,8 +147,8 @@ inline ADIOS_DATATYPES getBP1DataType(Datatype dtype)
146147 else if (sizeof (unsigned long ) == 8u )
147148 return adios_unsigned_long;
148149 else
149- throw unsupported_data_error (
150- " No native equivalent for Datatype::USHORT found." );
150+ error::throwOperationUnsupportedInBackend (
151+ " ADIOS1 " , " No native equivalent for Datatype::USHORT found." );
151152 case DT::UINT:
152153 case DT::VEC_UINT:
153154 if (sizeof (unsigned int ) == 2u )
@@ -157,8 +158,8 @@ inline ADIOS_DATATYPES getBP1DataType(Datatype dtype)
157158 else if (sizeof (unsigned int ) == 8u )
158159 return adios_unsigned_long;
159160 else
160- throw unsupported_data_error (
161- " No native equivalent for Datatype::UINT found." );
161+ error::throwOperationUnsupportedInBackend (
162+ " ADIOS1 " , " No native equivalent for Datatype::UINT found." );
162163 case DT::ULONG:
163164 case DT::VEC_ULONG:
164165 if (sizeof (unsigned long ) == 2u )
@@ -168,8 +169,8 @@ inline ADIOS_DATATYPES getBP1DataType(Datatype dtype)
168169 else if (sizeof (unsigned long ) == 8u )
169170 return adios_unsigned_long;
170171 else
171- throw unsupported_data_error (
172- " No native equivalent for Datatype::ULONG found." );
172+ error::throwOperationUnsupportedInBackend (
173+ " ADIOS1 " , " No native equivalent for Datatype::ULONG found." );
173174 case DT::ULONGLONG:
174175 case DT::VEC_ULONGLONG:
175176 if (sizeof (unsigned long long ) == 2u )
@@ -179,7 +180,8 @@ inline ADIOS_DATATYPES getBP1DataType(Datatype dtype)
179180 else if (sizeof (unsigned long long ) == 8u )
180181 return adios_unsigned_long;
181182 else
182- throw unsupported_data_error (
183+ error::throwOperationUnsupportedInBackend (
184+ " ADIOS1" ,
183185 " No native equivalent for Datatype::ULONGLONG found." );
184186 case DT::FLOAT:
185187 case DT::VEC_FLOAT:
@@ -199,8 +201,8 @@ inline ADIOS_DATATYPES getBP1DataType(Datatype dtype)
199201 return adios_double_complex;
200202 case DT::CLONG_DOUBLE:
201203 case DT::VEC_CLONG_DOUBLE:
202- throw unsupported_data_error (
203- " No native equivalent for Datatype::CLONG_DOUBLE found." );
204+ error::throwOperationUnsupportedInBackend (
205+ " ADIOS1 " , " No native equivalent for Datatype::CLONG_DOUBLE found." );
204206 case DT::STRING:
205207 return adios_string;
206208 case DT::VEC_STRING:
0 commit comments