mirror of
https://github.com/yushijinhun/authlib-injector.git
synced 2024-11-15 06:11:09 +01:00
implement #12
This commit is contained in:
parent
f460e0e230
commit
be38c9ba98
2 changed files with 5 additions and 3 deletions
|
@ -62,7 +62,7 @@ public final class AuthlibInjector {
|
||||||
metadataResponse = asString(getURL(apiRoot));
|
metadataResponse = asString(getURL(apiRoot));
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
info("unable to fetch metadata: {0}", e);
|
info("unable to fetch metadata: {0}", e);
|
||||||
return empty();
|
throw new UncheckedIOException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -73,7 +73,7 @@ public final class AuthlibInjector {
|
||||||
info("unable to decode metadata: {0}\n"
|
info("unable to decode metadata: {0}\n"
|
||||||
+ "metadata to decode:\n"
|
+ "metadata to decode:\n"
|
||||||
+ "{1}", e, prefetched);
|
+ "{1}", e, prefetched);
|
||||||
return empty();
|
throw e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ public final class AuthlibInjector {
|
||||||
+ "metadata to parse:\n"
|
+ "metadata to parse:\n"
|
||||||
+ "{1}",
|
+ "{1}",
|
||||||
e, metadataResponse);
|
e, metadataResponse);
|
||||||
return empty();
|
throw e;
|
||||||
}
|
}
|
||||||
debug("parsed metadata: {0}", configuration);
|
debug("parsed metadata: {0}", configuration);
|
||||||
return of(configuration);
|
return of(configuration);
|
||||||
|
|
|
@ -16,6 +16,8 @@ public class AuthlibInjectorPremain {
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
// prevent the exception being thrown to VM
|
// prevent the exception being thrown to VM
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
info("an exception has been caught, exiting");
|
||||||
|
System.exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue