1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 import java.util.Arrays;
8 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
9 public class LightningError extends CommonBase {
10 LightningError(Object _dummy, long ptr) { super(ptr); }
11 @Override @SuppressWarnings("deprecation")
12 protected void finalize() throws Throwable {
14 if (ptr != 0) { bindings.LightningError_free(ptr); }
17 public String get_err() {
18 String ret = bindings.LightningError_get_err(this.ptr);
22 public void set_err(byte[] val) {
23 bindings.LightningError_set_err(this.ptr, val);
26 public ErrorAction get_action() {
27 long ret = bindings.LightningError_get_action(this.ptr);
28 ErrorAction ret_hu_conv = ErrorAction.constr_from_ptr(ret);
29 ret_hu_conv.ptrs_to.add(this);
33 public void set_action(ErrorAction val) {
34 bindings.LightningError_set_action(this.ptr, val.ptr);
37 public static LightningError constructor_new(byte[] err_arg, ErrorAction action_arg) {
38 long ret = bindings.LightningError_new(err_arg, action_arg.ptr);
39 LightningError ret_hu_conv = new LightningError(null, ret);