This is an automated email from the ASF dual-hosted git repository.
sergeykamov pushed a commit to branch NLPCRAFT-310
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
The following commit(s) were added to refs/heads/NLPCRAFT-310 by this push:
new 0d1fba4 WIP.
0d1fba4 is described below
commit 0d1fba4b21f29ffd64770b060b5ba393ba3ab25d
Author: Sergey Kamov <[email protected]>
AuthorDate: Wed Apr 28 13:06:11 2021 +0300
WIP.
---
.../apache/nlpcraft/example/minecraft/NCMinecraftExampleMod.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git
a/nlpcraft-examples/minecraft-mod/src/main/java/org/apache/nlpcraft/example/minecraft/NCMinecraftExampleMod.java
b/nlpcraft-examples/minecraft-mod/src/main/java/org/apache/nlpcraft/example/minecraft/NCMinecraftExampleMod.java
index 280c9d2..0056b97 100644
---
a/nlpcraft-examples/minecraft-mod/src/main/java/org/apache/nlpcraft/example/minecraft/NCMinecraftExampleMod.java
+++
b/nlpcraft-examples/minecraft-mod/src/main/java/org/apache/nlpcraft/example/minecraft/NCMinecraftExampleMod.java
@@ -117,7 +117,9 @@ public class NCMinecraftExampleMod {
}
private static class UnauthorizedException extends Exception {
- // No-op.
+ public UnauthorizedException(String message) {
+ super(message);
+ }
}
/**
@@ -260,7 +262,7 @@ public class NCMinecraftExampleMod {
int code = conn.getResponseCode();
if (code == 401)
- throw new UnauthorizedException();
+ throw new UnauthorizedException("Authorization error");
try (BufferedReader in = new BufferedReader(new
InputStreamReader(conn.getInputStream()))) {
return GSON.fromJson(in, clazz);