//******************************************************************************
//
// File:    PrintJobException.java
// Package: net.jini.print.job
// Unit:    Class net.jini.print.job.PrintJobException
//
//******************************************************************************

package net.jini.print.job;

import javax.print.PrintException;

/**
 * Class PrintJobException encapsulates an error condition that occurred while 
 * using a Print Job object. 
 * <P>
 * Class PrintJobException extends the base class {@link 
 * javax.print.exception.PrintException PrintException} by providing additional 
 * information about which object encountered the error, namely a Print Job 
 * object. 
 * <P>
 * <B>DRAFT STANDARD VERSION 1.0 (23-MAY-2000)</B>
 *
 * @author  Alan Kaminsky
 * @version 08-Mar-2000
 */
public class PrintJobException
	extends PrintException
	{

// Hidden data members.

	/**
	 * Print Job object that encountered the error.
	 * @serial
	 */
	protected PrintJob printJob;

// Exported constructors.

	/**
	 * Construct a print job exception with no detail message. 
	 *
	 * @param  thePrintJob  Print Job object that encountered the error.
	 */
	public PrintJobException
		(PrintJob thePrintJob)
		{
		super();
		printJob = thePrintJob;
		}

	/**
	 * Construct a print job exception with the given detail message. 
	 *
	 * @param  thePrintJob  Print Job object that encountered the error.
	 * @param  s            Detail message, or null if no detail message.
	 */
	public PrintJobException
		(PrintJob thePrintJob,
		 String s)
		{
		super (s);
		printJob = thePrintJob;
		}

// Exported operations.

	/**
	 * Returns the Print Job object that encountered the error.
	 */
	public PrintJob getPrintJob()
		{
		return printJob;
		}

	}