Graphics API init will now catch exceptions
This commit is contained in:
parent
005ebfbfae
commit
2b83a1885e
1 changed files with 7 additions and 2 deletions
|
@ -211,11 +211,16 @@ public final class GraphicsSubsystem implements SubsystemMainClass {
|
||||||
logger.verb("Choosing a compatible Graphics API: Chose Graphics API " + compatibleApis.getLast());
|
logger.verb("Choosing a compatible Graphics API: Chose Graphics API " + compatibleApis.getLast());
|
||||||
|
|
||||||
api = registeredApis.get(compatibleApis.getLast());
|
api = registeredApis.get(compatibleApis.getLast());
|
||||||
api.initializeApi();
|
try {
|
||||||
|
api.initializeApi();
|
||||||
|
} catch (Throwable throwable) {
|
||||||
|
logger.crash("Graphics API " + api.getApiName() + " failed to initialize", throwable, true);
|
||||||
|
throw throwable;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
logger.error("Choosing a compatible Graphics API: No compatible Graphics API found");
|
logger.error("Choosing a compatible Graphics API: No compatible Graphics API was found");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue