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
209    } catch (cerr) {
210        console.error(cerr);
211    }
212    process.exit(1);213})
214const splchecker = new SpellChecker(new SpellCfg({ ignoreCase: false, languages: ['en-us'] }));
215splchecker.addProviderByConfig({ name: 'hunspell' });
Don't use process.exit(); throw an error instead
186        process.exit(0);
187    } catch (err) {
188        console.error(err);
189        process.exit(1);190    }
191})
192process.on("uncaughtException", async (err) => {
Don't use process.exit(); throw an error instead
183                embeds: [mbed],
184            });
185        }
186        process.exit(0);187    } catch (err) {
188        console.error(err);
189        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})