File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 214214 #undef SetPort
215215%}
216216
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+
217229%include " exception.i"
218230%exception {
219231 try {
234246 $result = nil
235247%}
236248
249+ // ==================
250+ // END ERROR HANDLING
251+ // ==================
252+
237253/* *
238254 * Provides mapping for C++ vectors.
239255 * For example, vector<double> will be called as VectorDouble in GoLang.
You can’t perform that action at this time.
0 commit comments