title: How to properly throw an error in Vue.js?
body: <p>I am building an SVG component that takes a filename without extension. I want to force this and throw an error if the extension is used though.</p>
  
  <p>Since I have a ES6 compiler I am simply using this:</p>
  
  <pre><code>if (this.name.includes('.svg')) {
      throw 'Do not use the svg extension';
  }
  </code></pre>
  
  <p>Is this a proper way to throw an error in Vue.js or is there a better way? Currently I am getting 2 warnings when I implement this and test it out.</p>
  
  <p>I am getting a [Vue warn] with stacktrace and my own error. Preferably I would just like to throw a simply error message in the console to signify what a user did wrong.</p>
  
  <p>Any thoughts on this approach or tips to handle this better in Vue.js or javscript in general?</p>