Creating an exception class by extending Exception class - Java Object Oriented Design

Java examples for Object Oriented Design:Exception

Introduction

Adding additional fields or methods to a custom exception class is unusual.

class ProductDataException extends Exception
{
     public ProductDataException
     {
     }

     public ProductDataException(String message)
     {
           super(message);
     }
}

Related Tutorials