/*---------------------------------------------------------------------------*
 |          Copyright (c) 2005-2010 PDFlib GmbH. All rights reserved.        |
 +---------------------------------------------------------------------------+
 |    This software may not be copied or distributed except as expressly     |
 |    authorized by PDFlib GmbH's general license agreement or a custom      |
 |    license agreement signed by PDFlib GmbH.                               |
 |    For more information about licensing please refer to www.pdflib.com.   |
 *---------------------------------------------------------------------------*/

/* $Id: TETException.java,v 1.11.2.2 2012/02/21 21:44:57 rjs Exp $
 *
 * TETException Java class
 */

package com.pdflib;

/** Text Extraction Toolkit (TET):
    Toolkit for extracting Text, Images, and Metadata from PDF Documents<br>

    Exception handling for TET.
    @author Rainer Schaaf
    @version 4.1
*/

public class TETException extends Exception {
    public TETException() {
	super();
    }

    public TETException(String msg) {
	super(msg);
    }

    public TETException(String msg, int errnum, String apiname) {
	super(msg);
	tet_errnum = errnum;
	tet_apiname = apiname;
    }

    /** Map standard getMessage method to get_errmsg. */
    public String get_errmsg() {
        return super.getMessage();
    }

    /** Get the error number of the exception. */
    public int get_errnum() {
	return tet_errnum;
    }

    /** Get the name of the API function which caused the exception. */
    public String get_apiname() {
	return tet_apiname;
    }

    private int tet_errnum;
    private String tet_apiname;
}
