@@ -47,8 +47,7 @@ em::val NativeDjinniPerfBenchmark::getInstance() {
47
47
return ::djinni_generated::NativeDjinniPerfBenchmark::fromCpp (r);
48
48
}
49
49
catch (const std::exception& e) {
50
- djinni::djinni_throw_native_exception (e);
51
- throw ;
50
+ return djinni::ExceptionHandlingTraits<::djinni_generated::NativeDjinniPerfBenchmark>::handleNativeException (e);
52
51
}
53
52
}
54
53
int64_t NativeDjinniPerfBenchmark::cppTests (const CppType& self) {
@@ -57,125 +56,111 @@ int64_t NativeDjinniPerfBenchmark::cppTests(const CppType& self) {
57
56
return ::djinni::I64::fromCpp (r);
58
57
}
59
58
catch (const std::exception& e) {
60
- djinni::djinni_throw_native_exception (e);
61
- throw ;
59
+ return djinni::ExceptionHandlingTraits<::djinni::I64>::handleNativeException (e);
62
60
}
63
61
}
64
62
void NativeDjinniPerfBenchmark::baseline (const CppType& self) {
65
63
try {
66
64
self->baseline ();
67
65
}
68
66
catch (const std::exception& e) {
69
- djinni::djinni_throw_native_exception (e);
70
- throw ;
67
+ return djinni::ExceptionHandlingTraits<void >::handleNativeException (e);
71
68
}
72
69
}
73
70
void NativeDjinniPerfBenchmark::argString (const CppType& self, const std::string& w_s) {
74
71
try {
75
72
self->argString (::djinni::String::toCpp (w_s));
76
73
}
77
74
catch (const std::exception& e) {
78
- djinni::djinni_throw_native_exception (e);
79
- throw ;
75
+ return djinni::ExceptionHandlingTraits<void >::handleNativeException (e);
80
76
}
81
77
}
82
78
void NativeDjinniPerfBenchmark::argBinary (const CppType& self, const em::val& w_b) {
83
79
try {
84
80
self->argBinary (::djinni::Binary::toCpp (w_b));
85
81
}
86
82
catch (const std::exception& e) {
87
- djinni::djinni_throw_native_exception (e);
88
- throw ;
83
+ return djinni::ExceptionHandlingTraits<void >::handleNativeException (e);
89
84
}
90
85
}
91
86
void NativeDjinniPerfBenchmark::argDataRef (const CppType& self, const em::val& w_r) {
92
87
try {
93
88
self->argDataRef (::djinni::NativeDataRef::toCpp (w_r));
94
89
}
95
90
catch (const std::exception& e) {
96
- djinni::djinni_throw_native_exception (e);
97
- throw ;
91
+ return djinni::ExceptionHandlingTraits<void >::handleNativeException (e);
98
92
}
99
93
}
100
94
void NativeDjinniPerfBenchmark::argDataView (const CppType& self, const em::val& w_d) {
101
95
try {
102
96
self->argDataView (::djinni::NativeDataView::toCpp (w_d));
103
97
}
104
98
catch (const std::exception& e) {
105
- djinni::djinni_throw_native_exception (e);
106
- throw ;
99
+ return djinni::ExceptionHandlingTraits<void >::handleNativeException (e);
107
100
}
108
101
}
109
102
void NativeDjinniPerfBenchmark::argEnumSixValue (const CppType& self, int32_t w_e) {
110
103
try {
111
104
self->argEnumSixValue (::djinni_generated::NativeEnumSixValue::toCpp (w_e));
112
105
}
113
106
catch (const std::exception& e) {
114
- djinni::djinni_throw_native_exception (e);
115
- throw ;
107
+ return djinni::ExceptionHandlingTraits<void >::handleNativeException (e);
116
108
}
117
109
}
118
110
void NativeDjinniPerfBenchmark::argRecordSixInt (const CppType& self, const em::val& w_r) {
119
111
try {
120
112
self->argRecordSixInt (::djinni_generated::NativeRecordSixInt::toCpp (w_r));
121
113
}
122
114
catch (const std::exception& e) {
123
- djinni::djinni_throw_native_exception (e);
124
- throw ;
115
+ return djinni::ExceptionHandlingTraits<void >::handleNativeException (e);
125
116
}
126
117
}
127
118
void NativeDjinniPerfBenchmark::argListInt (const CppType& self, const em::val& w_v) {
128
119
try {
129
120
self->argListInt (::djinni::List<::djinni::I64>::toCpp (w_v));
130
121
}
131
122
catch (const std::exception& e) {
132
- djinni::djinni_throw_native_exception (e);
133
- throw ;
123
+ return djinni::ExceptionHandlingTraits<void >::handleNativeException (e);
134
124
}
135
125
}
136
126
void NativeDjinniPerfBenchmark::argArrayInt (const CppType& self, const em::val& w_v) {
137
127
try {
138
128
self->argArrayInt (::djinni::Array<::djinni::I64>::toCpp (w_v));
139
129
}
140
130
catch (const std::exception& e) {
141
- djinni::djinni_throw_native_exception (e);
142
- throw ;
131
+ return djinni::ExceptionHandlingTraits<void >::handleNativeException (e);
143
132
}
144
133
}
145
134
void NativeDjinniPerfBenchmark::argObject (const CppType& self, const em::val& w_c) {
146
135
try {
147
136
self->argObject (::djinni_generated::NativeObjectPlatform::toCpp (w_c));
148
137
}
149
138
catch (const std::exception& e) {
150
- djinni::djinni_throw_native_exception (e);
151
- throw ;
139
+ return djinni::ExceptionHandlingTraits<void >::handleNativeException (e);
152
140
}
153
141
}
154
142
void NativeDjinniPerfBenchmark::argListObject (const CppType& self, const em::val& w_l) {
155
143
try {
156
144
self->argListObject (::djinni::List<::djinni_generated::NativeObjectPlatform>::toCpp (w_l));
157
145
}
158
146
catch (const std::exception& e) {
159
- djinni::djinni_throw_native_exception (e);
160
- throw ;
147
+ return djinni::ExceptionHandlingTraits<void >::handleNativeException (e);
161
148
}
162
149
}
163
150
void NativeDjinniPerfBenchmark::argListRecord (const CppType& self, const em::val& w_l) {
164
151
try {
165
152
self->argListRecord (::djinni::List<::djinni_generated::NativeRecordSixInt>::toCpp (w_l));
166
153
}
167
154
catch (const std::exception& e) {
168
- djinni::djinni_throw_native_exception (e);
169
- throw ;
155
+ return djinni::ExceptionHandlingTraits<void >::handleNativeException (e);
170
156
}
171
157
}
172
158
void NativeDjinniPerfBenchmark::argArrayRecord (const CppType& self, const em::val& w_a) {
173
159
try {
174
160
self->argArrayRecord (::djinni::List<::djinni_generated::NativeRecordSixInt>::toCpp (w_a));
175
161
}
176
162
catch (const std::exception& e) {
177
- djinni::djinni_throw_native_exception (e);
178
- throw ;
163
+ return djinni::ExceptionHandlingTraits<void >::handleNativeException (e);
179
164
}
180
165
}
181
166
int64_t NativeDjinniPerfBenchmark::returnInt (const CppType& self, int64_t w_i) {
@@ -184,8 +169,7 @@ int64_t NativeDjinniPerfBenchmark::returnInt(const CppType& self, int64_t w_i) {
184
169
return ::djinni::I64::fromCpp (r);
185
170
}
186
171
catch (const std::exception& e) {
187
- djinni::djinni_throw_native_exception (e);
188
- throw ;
172
+ return djinni::ExceptionHandlingTraits<::djinni::I64>::handleNativeException (e);
189
173
}
190
174
}
191
175
std::string NativeDjinniPerfBenchmark::returnString (const CppType& self, int32_t w_size) {
@@ -194,8 +178,7 @@ std::string NativeDjinniPerfBenchmark::returnString(const CppType& self, int32_t
194
178
return ::djinni::String::fromCpp (r);
195
179
}
196
180
catch (const std::exception& e) {
197
- djinni::djinni_throw_native_exception (e);
198
- throw ;
181
+ return djinni::ExceptionHandlingTraits<::djinni::String>::handleNativeException (e);
199
182
}
200
183
}
201
184
em::val NativeDjinniPerfBenchmark::returnBinary (const CppType& self, int32_t w_size) {
@@ -204,8 +187,7 @@ em::val NativeDjinniPerfBenchmark::returnBinary(const CppType& self, int32_t w_s
204
187
return ::djinni::Binary::fromCpp (r);
205
188
}
206
189
catch (const std::exception& e) {
207
- djinni::djinni_throw_native_exception (e);
208
- throw ;
190
+ return djinni::ExceptionHandlingTraits<::djinni::Binary>::handleNativeException (e);
209
191
}
210
192
}
211
193
em::val NativeDjinniPerfBenchmark::returnObject (const CppType& self) {
@@ -214,8 +196,7 @@ em::val NativeDjinniPerfBenchmark::returnObject(const CppType& self) {
214
196
return ::djinni_generated::NativeObjectNative::fromCpp (r);
215
197
}
216
198
catch (const std::exception& e) {
217
- djinni::djinni_throw_native_exception (e);
218
- throw ;
199
+ return djinni::ExceptionHandlingTraits<::djinni_generated::NativeObjectNative>::handleNativeException (e);
219
200
}
220
201
}
221
202
em::val NativeDjinniPerfBenchmark::returnListInt (const CppType& self, int32_t w_size) {
@@ -224,8 +205,7 @@ em::val NativeDjinniPerfBenchmark::returnListInt(const CppType& self, int32_t w_
224
205
return ::djinni::List<::djinni::I64>::fromCpp (r);
225
206
}
226
207
catch (const std::exception& e) {
227
- djinni::djinni_throw_native_exception (e);
228
- throw ;
208
+ return djinni::ExceptionHandlingTraits<::djinni::List<::djinni::I64>>::handleNativeException (e);
229
209
}
230
210
}
231
211
em::val NativeDjinniPerfBenchmark::returnArrayInt (const CppType& self, int32_t w_size) {
@@ -234,8 +214,7 @@ em::val NativeDjinniPerfBenchmark::returnArrayInt(const CppType& self, int32_t w
234
214
return ::djinni::Array<::djinni::I64>::fromCpp (r);
235
215
}
236
216
catch (const std::exception& e) {
237
- djinni::djinni_throw_native_exception (e);
238
- throw ;
217
+ return djinni::ExceptionHandlingTraits<::djinni::Array<::djinni::I64>>::handleNativeException (e);
239
218
}
240
219
}
241
220
em::val NativeDjinniPerfBenchmark::returnListObject (const CppType& self, int32_t w_size) {
@@ -244,8 +223,7 @@ em::val NativeDjinniPerfBenchmark::returnListObject(const CppType& self, int32_t
244
223
return ::djinni::List<::djinni_generated::NativeObjectNative>::fromCpp (r);
245
224
}
246
225
catch (const std::exception& e) {
247
- djinni::djinni_throw_native_exception (e);
248
- throw ;
226
+ return djinni::ExceptionHandlingTraits<::djinni::List<::djinni_generated::NativeObjectNative>>::handleNativeException (e);
249
227
}
250
228
}
251
229
em::val NativeDjinniPerfBenchmark::returnListRecord (const CppType& self, int32_t w_size) {
@@ -254,8 +232,7 @@ em::val NativeDjinniPerfBenchmark::returnListRecord(const CppType& self, int32_t
254
232
return ::djinni::List<::djinni_generated::NativeRecordSixInt>::fromCpp (r);
255
233
}
256
234
catch (const std::exception& e) {
257
- djinni::djinni_throw_native_exception (e);
258
- throw ;
235
+ return djinni::ExceptionHandlingTraits<::djinni::List<::djinni_generated::NativeRecordSixInt>>::handleNativeException (e);
259
236
}
260
237
}
261
238
em::val NativeDjinniPerfBenchmark::returnArrayRecord (const CppType& self, int32_t w_size) {
@@ -264,8 +241,7 @@ em::val NativeDjinniPerfBenchmark::returnArrayRecord(const CppType& self, int32_
264
241
return ::djinni::List<::djinni_generated::NativeRecordSixInt>::fromCpp (r);
265
242
}
266
243
catch (const std::exception& e) {
267
- djinni::djinni_throw_native_exception (e);
268
- throw ;
244
+ return djinni::ExceptionHandlingTraits<::djinni::List<::djinni_generated::NativeRecordSixInt>>::handleNativeException (e);
269
245
}
270
246
}
271
247
std::string NativeDjinniPerfBenchmark::roundTripString (const CppType& self, const std::string& w_s) {
@@ -274,8 +250,7 @@ std::string NativeDjinniPerfBenchmark::roundTripString(const CppType& self, cons
274
250
return ::djinni::String::fromCpp (r);
275
251
}
276
252
catch (const std::exception& e) {
277
- djinni::djinni_throw_native_exception (e);
278
- throw ;
253
+ return djinni::ExceptionHandlingTraits<::djinni::String>::handleNativeException (e);
279
254
}
280
255
}
281
256
0 commit comments