Team-Gigabyte / quotobot

Detected the use of process.exit() JS-0263
Bug risk
Major
5 months ago5 months old
Don't use process.exit(); throw an error instead
206    } catch (cerr) {
207        console.error(cerr);
208    }
209    process.exit(1);210})
211const splchecker = new SpellChecker(new SpellCfg({ ignoreCase: false, languages: ['en-us'] }));
212splchecker.addProviderByConfig({ name: 'hunspell' });
Don't use process.exit(); throw an error instead
185        process.exit(0);
186    } catch (err) {
187        console.error(err);
188        process.exit(1);189    }
190})
191process.on("uncaughtException", async (err) => {
Don't use process.exit(); throw an error instead
182                embeds: [mbed],
183            });
184        }
185        process.exit(0);186    } catch (err) {
187        console.error(err);
188        process.exit(1);
Don't use process.exit(); throw an error instead
 9    readline.question("What's the URL/path of the avatar? ", url => {
10        bot.user.setAvatar(url).then(() => {
11            console.log("All done!")
12            process.exit(0)13        }).catch(e => { throw e })
14    })
15})