I have written this code to test how custom exceptions are working in the dart.
I\'m not getting the desired output could someone explain to me how to handle it??
You don't need an Exception class if you don't care about the type of Exception. Simply fire an exception like this:
throw ("This is my first general exception");