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.xmp; 11 12 /** 13 * This exception wraps all errors that occur in the XMP Toolkit. 14 * 15 * @since 16.02.2006 16 */ 17 public class XMPException extends Exception 18 { 19 /** the errorCode of the XMP toolkit */ 20 private int errorCode; 21 22 23 /** 24 * Constructs an exception with a message and an error code. 25 * @param message the message 26 * @param errorCode the error code 27 */ 28 public XMPException(String message, int errorCode) 29 { 30 super(message); 31 this.errorCode = errorCode; 32 } 33 34 35 /** 36 * Constructs an exception with a message, an error code and a <code>Throwable</code> 37 * @param message the error message. 38 * @param errorCode the error code 39 * @param t the exception source 40 */ 41 public XMPException(String message, int errorCode, Throwable t) 42 { 43 super(message, t); 44 this.errorCode = errorCode; 45 } 46 47 48 /** 49 * @return Returns the errorCode. 50 */ 51 public int getErrorCode() 52 { 53 return errorCode; 54 } 55 }