title: How to create a custom exception and handle it in dart
body: <p>I have written this code to test how custom exceptions are working in the dart.</p>
  <p>I'm not getting the desired output could someone explain to me how to handle it??</p>
  <pre class="lang-dart prettyprint-override"><code>void main() 
  {   
    try
    {
      throwException();
    }
    on customException
    {
      print(&quot;custom exception is been obtained&quot;);
    }
    
  }
  
  throwException()
  {
    throw new customException('This is my first custom exception');
  }
  </code></pre>