public class PixelException extends Exception{ /** * Constructs and initializes a PixelException. */ PixelException(){ super( "Negative pixel coordinate" ); } /** * Constructs and initializes a PixelException. * * @param xCoor The x coordinate of the pixel causing the exception. * @param yCoor The y coordinate of the pixel causing the exception. */ PixelException( int xCoor, int yCoor ){ super( "Negative pixel coordinate: x = " + xCoor + ",y = " + yCoor ); } }