File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
src/main/java/com/wynntils/antiope Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 4
4
* Exception which is thrown when a {@link Result} that is not {@link Result#OK} occurs.
5
5
*/
6
6
public class GameSDKException extends RuntimeException {
7
- private Result result ;
7
+ private final Result result ;
8
8
9
9
public GameSDKException (Result result ) {
10
10
super ("Game SDK operation failed: " + result );
11
+ this .result = result ;
11
12
}
12
13
13
14
/**
Original file line number Diff line number Diff line change 3
3
4
4
import com .wynntils .antiope .core .DiscordGameSDKCore ;
5
5
import com .wynntils .antiope .core .type .CreateParams ;
6
+ import com .wynntils .antiope .core .type .GameSDKException ;
6
7
import com .wynntils .antiope .manager .activity .type .Activity ;
7
8
8
9
import java .time .Instant ;
@@ -20,7 +21,9 @@ public static void main(String[] args) {
20
21
try {
21
22
core = new DiscordGameSDKCore (params );
22
23
System .out .println ("got new core" );
23
- } catch (RuntimeException e ) {
24
+ } catch (GameSDKException e ) {
25
+ e .printStackTrace ();
26
+ System .out .println (e .getResult ());
24
27
System .out .println ("discord is not running, exiting" );
25
28
return ;
26
29
}
You can’t perform that action at this time.
0 commit comments