We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 309b7b3 commit 16273fbCopy full SHA for 16273fb
1 file changed
extism/extism.py
@@ -507,10 +507,10 @@ def cancel_handle(self):
507
return CancelHandle(_lib.extism_plugin_cancel_handle(self.plugin))
508
509
def _check_error(self, rc):
510
+ error = _lib.extism_plugin_error(self.plugin)
511
+ if error != _ffi.NULL:
512
+ raise Error(_ffi.string(error).decode())
513
if rc != 0:
- error = _lib.extism_plugin_error(self.plugin)
- if error != _ffi.NULL:
- raise Error(_ffi.string(error).decode())
514
raise Error(f"Error code: {rc}")
515
516
def function_exists(self, name: str) -> bool:
0 commit comments