001/* Thrown on access (by name) to an item that doesn't exist. 002 003 Copyright (c) 1997-2014 The Regents of the University of California. 004 All rights reserved. 005 Permission is hereby granted, without written agreement and without 006 license or royalty fees, to use, copy, modify, and distribute this 007 software and its documentation for any purpose, provided that the above 008 copyright notice and the following two paragraphs appear in all copies 009 of this software. 010 011 IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY 012 FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 013 ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF 014 THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF 015 SUCH DAMAGE. 016 017 THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, 018 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 019 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE 020 PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF 021 CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, 022 ENHANCEMENTS, OR MODIFICATIONS. 023 024 PT_COPYRIGHT_VERSION_2 025 COPYRIGHTENDKEY 026 027 */ 028package ptolemy.kernel.util; 029 030////////////////////////////////////////////////////////////////////////// 031//// NoSuchItemException 032 033/** 034 Thrown on access (by name) to an item that doesn't exist. 035 E.g., attempt to remove a port by name and no such port exists. 036 037 @author Edward A. Lee 038 @version $Id$ 039 @since Ptolemy II 0.2 040 @Pt.ProposedRating Green (cxh) 041 @Pt.AcceptedRating Green (cxh) 042 */ 043@SuppressWarnings("serial") 044public class NoSuchItemException extends KernelException { 045 /** Construct an exception with a detail message. 046 * @param detail A message. 047 */ 048 public NoSuchItemException(String detail) { 049 super(null, null, null, detail); 050 } 051 052 /** Construct an exception with a detail message that includes the 053 * name of the argument. 054 * @param object The object in which the item might have been. 055 * @param detail A message. 056 */ 057 public NoSuchItemException(Nameable object, String detail) { 058 super(object, null, null, detail); 059 } 060 061 /** Construct an exception with a cause and a detail message that 062 * includes the name of the argument. 063 * 064 * @param object The object in which the item might have been. 065 * @param cause The cause of this exception, or null if the cause 066 * is not known or nonexistent. 067 * @param detail The message. 068 */ 069 public NoSuchItemException(Nameable object, Throwable cause, 070 String detail) { 071 super(object, null, cause, detail); 072 } 073}