How to properly throw an error in Vue.js?
You should use the standard TypeError:
Creates an instance representing an error that occurs when a variable or parameter is not of a valid type.
throw new TypeError("Do not use the svg extension", filename)
TypeError-MDN