//******************************************************************************
//
// File:    PrintServiceException.java
// Package: net.jini.print.service
// Unit:    Class net.jini.print.service.PrintServiceException
//
//******************************************************************************

package net.jini.print.service;

import javax.print.PrintException;

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

// Hidden data members.

	/**
	 * Print Service object that encountered the error.
	 * @serial
	 */
	protected PrintService printService;

// Exported constructors.

	/**
	 * Construct a print service exception with no detail message. 
	 *
	 * @param  thePrintService  Print Service object that encountered the error.
	 */
	public PrintServiceException
		(PrintService thePrintService)
		{
		super();
		printService = thePrintService;
		}

	/**
	 * Construct a print service exception with the given detail message. 
	 *
	 * @param  thePrintService  Print Service object that encountered the error.
	 * @param  s                Detail message, or null if no detail message.
	 */
	public PrintServiceException
		(PrintService thePrintService,
		 String s)
		{
		super (s);
		printService = thePrintService;
		}

// Exported operations.

	/**
	 * Returns the Print Service object that encountered the error.
	 */
	public PrintService getPrintService()
		{
		return printService;
		}

	}