| 1 | // ================================================================================================= |
| 2 | // ADOBE SYSTEMS INCORPORATED |
| 3 | // Copyright 2006 Adobe Systems Incorporated |
| 4 | // All Rights Reserved |
| 5 | // |
| 6 | // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms |
| 7 | // of the Adobe license agreement accompanying it. |
| 8 | // ================================================================================================= |
| 9 | |
| 10 | package com.adobe.internal.xmp; |
| 11 | |
| 12 | /** |
| 13 | * This exception wraps all errors that occur in the XMP Toolkit. |
| 14 | * |
| 15 | * @author Stefan Makswit |
| 16 | * @version $Revision$ |
| 17 | * @since 16.02.2006 |
| 18 | */ |
| 19 | public class XMPException extends Exception |
| 20 | { |
| 21 | /** the errorCode of the XMP toolkit */ |
| 22 | private int errorCode; |
| 23 | |
| 24 | |
| 25 | /** |
| 26 | * Constructs an exception with a message and an error code. |
| 27 | * @param message the message |
| 28 | * @param errorCode the error code |
| 29 | */ |
| 30 | public XMPException(String message, int errorCode) |
| 31 | { |
| 32 | super(message); |
| 33 | this.errorCode = errorCode; |
| 34 | } |
| 35 | |
| 36 | |
| 37 | /** |
| 38 | * Constructs an exception with a message, an error code and a <code>Throwable</code> |
| 39 | * @param message the error message. |
| 40 | * @param errorCode the error code |
| 41 | * @param t the exception source |
| 42 | */ |
| 43 | public XMPException(String message, int errorCode, Throwable t) |
| 44 | { |
| 45 | super(message, t); |
| 46 | this.errorCode = errorCode; |
| 47 | } |
| 48 | |
| 49 | |
| 50 | /** |
| 51 | * @return Returns the errorCode. |
| 52 | */ |
| 53 | public int getErrorCode() |
| 54 | { |
| 55 | return errorCode; |
| 56 | } |
| 57 | } |