alef 0.62.10

Opinionated polyglot binding generator for Rust libraries
Documentation
1
2
3
4
5
6
7
{{ indent }}if (nativeResult == {{ zero }})
{{ indent }}{
{{ indent }}    var ec = NativeMethods.LastErrorCode();
{{ indent }}    var ctxPtr = NativeMethods.LastErrorContext();
{{ indent }}    var msg = global::System.Runtime.InteropServices.Marshal.PtrToStringUTF8(ctxPtr) ?? "{{ cs_native_name }} failed";
{{ indent }}    throw new {{ exception_name }}(ec, msg);
{{ indent }}}