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

package net.jini.print.job;

import javax.print.PrintException;

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

// Hidden data members.

	/**
	 * Print Request object that encountered the error.
	 * @serial
	 */
	protected PrintRequest printRequest;

// Exported constructors.

	/**
	 * Construct a print request exception with no detail message. 
	 *
	 * @param  thePrintRequest  Print Request object that encountered the error.
	 */
	public PrintRequestException
		(PrintRequest thePrintRequest)
		{
		super();
		printRequest = thePrintRequest;
		}

	/**
	 * Construct a print request exception with the given detail message. 
	 *
	 * @param  thePrintRequest  Print Request object that encountered the error.
	 * @param  s            Detail message, or null if no detail message.
	 */
	public PrintRequestException
		(PrintRequest thePrintRequest,
		 String s)
		{
		super (s);
		printRequest = thePrintRequest;
		}

// Exported operations.

	/**
	 * Returns the Print Request object that encountered the error.
	 */
	public PrintRequest getPrintRequest()
		{
		return printRequest;
		}

	}