Skip to content

Commit 34c067b

Browse files
committed
Fix NSMessageInvocationException not assigning fields
1 parent eea8e4f commit 34c067b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/main/java/ca/weblite/objc/NSMessageInvocationException.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@
2323
* @author shannah
2424
*/
2525
public class NSMessageInvocationException extends RuntimeException {
26-
private String selectorName;
27-
private Method method;
26+
private static final long serialVersionUID = 1L;
27+
28+
private final String selectorName;
29+
private final Method method;
2830

2931
/**
3032
* Creates a new instance of this exception.
@@ -34,6 +36,8 @@ public class NSMessageInvocationException extends RuntimeException {
3436
*/
3537
public NSMessageInvocationException(String selectorName, Method method, Throwable cause) {
3638
super(String.format("Method invocation for selector %s caused exception. Method: %s", selectorName, method), cause);
39+
this.selectorName = selectorName;
40+
this.method = method;
3741
}
3842

3943
/**

0 commit comments

Comments
 (0)