We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d138748 commit 11f3d20Copy full SHA for 11f3d20
1 file changed
PDFTronGo/pdftron.i
@@ -214,6 +214,18 @@
214
#undef SetPort
215
%}
216
217
+// ==============
218
+// ERROR HANDLING
219
220
+// Converts C++ exceptions to Go errors using panic/recovery mechanism.
221
+// All functions now return an error in addition to their return type instead of panicking on exceptions.
222
+
223
+// Ensure necessary imports for error handling code
224
+%insert(go_imports) %{
225
+import "errors"
226
+import "fmt"
227
+%}
228
229
%include "exception.i"
230
%exception {
231
try {
@@ -234,6 +246,10 @@
234
246
$result = nil
235
247
236
248
249
+// ==================
250
+// END ERROR HANDLING
251
252
237
253
/**
238
254
* Provides mapping for C++ vectors.
239
255
* For example, vector<double> will be called as VectorDouble in GoLang.
0 commit comments