mirror of
https://github.com/yuzu-emu/Command-fix.git
synced 2024-11-22 10:15:41 +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 () {
|
export function readCustomResponses () {
|
||||||
// Load the responses file into the responses variable.
|
// Load the responses file into the responses variable.
|
||||||
|
try {
|
||||||
state.responses = require(`./responses/${process.env.TENANT}.json`);
|
state.responses = require(`./responses/${process.env.TENANT}.json`);
|
||||||
logger.debug(`Loaded responses file for ${process.env.TENANT} from external source.`);
|
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 () {
|
export function flushWarnings () {
|
||||||
|
Loading…
Reference in New Issue
Block a user