[Java] Print error stack trace when tests fail
[ldk-java] / src / main / java / org / ldk / structs / PeerHandleError.java
1 package org.ldk.structs;
2
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
5 import org.ldk.util.*;
6 import java.util.Arrays;
7 import java.lang.ref.Reference;
8 import javax.annotation.Nullable;
9
10
11 /**
12  * Error for PeerManager errors. If you get one of these, you must disconnect the socket and
13  * generate no further read_event/write_buffer_space_avail/socket_disconnected calls for the
14  * descriptor.
15  */
16 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
17 public class PeerHandleError extends CommonBase {
18         PeerHandleError(Object _dummy, long ptr) { super(ptr); }
19         @Override @SuppressWarnings("deprecation")
20         protected void finalize() throws Throwable {
21                 super.finalize();
22                 if (ptr != 0) { bindings.PeerHandleError_free(ptr); }
23         }
24
25         /**
26          * Constructs a new PeerHandleError given each field
27          */
28         public static PeerHandleError of() {
29                 long ret = bindings.PeerHandleError_new();
30                 if (ret >= 0 && ret <= 4096) { return null; }
31                 org.ldk.structs.PeerHandleError ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.PeerHandleError(null, ret); }
32                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
33                 return ret_hu_conv;
34         }
35
36         long clone_ptr() {
37                 long ret = bindings.PeerHandleError_clone_ptr(this.ptr);
38                 Reference.reachabilityFence(this);
39                 return ret;
40         }
41
42         /**
43          * Creates a copy of the PeerHandleError
44          */
45         public PeerHandleError clone() {
46                 long ret = bindings.PeerHandleError_clone(this.ptr);
47                 Reference.reachabilityFence(this);
48                 if (ret >= 0 && ret <= 4096) { return null; }
49                 org.ldk.structs.PeerHandleError ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.PeerHandleError(null, ret); }
50                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
51                 return ret_hu_conv;
52         }
53
54 }