mirror of
https://github.com/yuzu-emu/Command-fix.git
synced 2024-11-22 04:35:39 +01:00
data: do not crash if the response file is bad
This commit is contained in:
parent
2f72dc23fc
commit
354074089d
@ -32,8 +32,12 @@ export function readBans () {
|
||||
|
||||
export function readCustomResponses () {
|
||||
// Load the responses file into the responses variable.
|
||||
state.responses = require(`./responses/${process.env.TENANT}.json`);
|
||||
logger.debug(`Loaded responses file for ${process.env.TENANT} from external source.`);
|
||||
try {
|
||||
state.responses = require(`./responses/${process.env.TENANT}.json`);
|
||||
logger.debug(`Loaded responses file for ${process.env.TENANT} from external source.`);
|
||||
} catch (e) {
|
||||
logger.error(`Failed to load ${process.env.TENANT}.json! Custom responses are disabled.`);
|
||||
}
|
||||
}
|
||||
|
||||
export function flushWarnings () {
|
||||
|
Loading…
Reference in New Issue
Block a user