Display steam load error message
This commit is contained in:
@@ -275,6 +275,7 @@ missing = This item has been deleted or moved.\n[lightgray]The workshop listing
|
|||||||
publishing = [accent]Publishing...
|
publishing = [accent]Publishing...
|
||||||
publish.confirm = Are you sure you want to publish this?\n\n[lightgray]Make sure you agree to the Workshop EULA first, or your items will not show up!
|
publish.confirm = Are you sure you want to publish this?\n\n[lightgray]Make sure you agree to the Workshop EULA first, or your items will not show up!
|
||||||
publish.error = Error publishing item: {0}
|
publish.error = Error publishing item: {0}
|
||||||
|
steam.error = Failed to initialize Steam services.\nError: {0}
|
||||||
|
|
||||||
editor.brush = Brush
|
editor.brush = Brush
|
||||||
editor.openin = Open In Editor
|
editor.openin = Open In Editor
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ public class DesktopLauncher extends ClientLauncher{
|
|||||||
public final static String discordID = "610508934456934412";
|
public final static String discordID = "610508934456934412";
|
||||||
|
|
||||||
boolean useDiscord = OS.is64Bit, loadError = false;
|
boolean useDiscord = OS.is64Bit, loadError = false;
|
||||||
|
Throwable steamError;
|
||||||
|
|
||||||
static{
|
static{
|
||||||
if(!Charset.forName("US-ASCII").newEncoder().canEncode(System.getProperty("user.name", ""))){
|
if(!Charset.forName("US-ASCII").newEncoder().canEncode(System.getProperty("user.name", ""))){
|
||||||
@@ -134,6 +135,12 @@ public class DesktopLauncher extends ClientLauncher{
|
|||||||
label[0].invalidateHierarchy();
|
label[0].invalidateHierarchy();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if(steamError != null){
|
||||||
|
Core.app.post(() -> Core.app.post(() -> Core.app.post(() -> {
|
||||||
|
ui.showErrorMessage(Core.bundle.format("steam.error", (steamError.getMessage() == null) ? steamError.getClass().getSimpleName() : steamError.getClass().getSimpleName() + ": " + steamError.getMessage()));
|
||||||
|
})));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
try{
|
try{
|
||||||
@@ -159,6 +166,7 @@ public class DesktopLauncher extends ClientLauncher{
|
|||||||
}
|
}
|
||||||
|
|
||||||
void logSteamError(Throwable e){
|
void logSteamError(Throwable e){
|
||||||
|
steamError = e;
|
||||||
loadError = true;
|
loadError = true;
|
||||||
Log.err(e);
|
Log.err(e);
|
||||||
try(OutputStream s = new FileOutputStream(new File("steam-error-log-" + System.nanoTime() + ".txt"))){
|
try(OutputStream s = new FileOutputStream(new File("steam-error-log-" + System.nanoTime() + ".txt"))){
|
||||||
|
|||||||
Reference in New Issue
Block a user