I am writing a program which loads a file and run some functions on it. Multiple files can be loaded.
If there's an error loading the file, like a misspelling of the name, I log a console.error
. But I don't want to stop the execution.
Does console.error
stops the execution? Does throw new error
can be an alternative? Or should I use console.warn
?
Does console.error stops the execution?
No
Does throw new error can be an alternative?
Yes, as follow: throw new Error("Message");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With