001/*
002 * CycleException.java April 2007
003 *
004 * Copyright (C) 2007, Niall Gallagher <niallg@users.sf.net>
005 *
006 * Licensed under the Apache License, Version 2.0 (the "License");
007 * you may not use this file except in compliance with the License.
008 * You may obtain a copy of the License at
009 *
010 *     http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
015 * implied. See the License for the specific language governing 
016 * permissions and limitations under the License.
017 */
018
019package org.simpleframework.xml.strategy;
020
021import org.simpleframework.xml.core.PersistenceException;
022
023/**
024 * The <code>CycleException</code> is thrown when an invalid cycle 
025 * is found when deserializing an object from an XML document. This
026 * usually indicates the either the XML has been edited incorrectly
027 * or has been corrupted. Conditions that this exception is thrown
028 * are when there is an invalid reference or a duplicate identifier. 
029 * 
030 * @author Niall Gallagher
031 * 
032 * @see org.simpleframework.xml.strategy.CycleStrategy
033 */
034public class CycleException extends PersistenceException {
035   
036   /**
037    * Constructor for the <code>CycleException</code> object. This  
038    * constructor takes a format string an a variable number of 
039    * object arguments, which can be inserted into the format string. 
040    * 
041    * @param text a format string used to present the error message
042    * @param list a list of arguments to insert into the string
043    */
044   public CycleException(String text, Object... list) {
045      super(text, list);           
046   }        
047   
048   /**
049    * Constructor for the <code>CycleException</code> object. This 
050    * constructor takes a format string an a variable number of 
051    * object arguments, which can be inserted into the format string. 
052    * 
053    * @param cause the source exception this is used to represent
054    * @param text a format string used to present the error message
055    * @param list a list of arguments to insert into the string 
056    */
057   public CycleException(Throwable cause, String text, Object... list) {
058      super(cause, text, list);           
059   }
060}