Coverage Report - org.simpleframework.xml.transform.TransformException
 
Classes in this File Line Coverage Branch Coverage Complexity
TransformException
50%
2/4
N/A
1
 
 1  
 /*
 2  
  * TransformException.java May 2007
 3  
  *
 4  
  * Copyright (C) 2007, Niall Gallagher <niallg@users.sf.net>
 5  
  *
 6  
  * Licensed under the Apache License, Version 2.0 (the "License");
 7  
  * you may not use this file except in compliance with the License.
 8  
  * You may obtain a copy of the License at
 9  
  *
 10  
  *     http://www.apache.org/licenses/LICENSE-2.0
 11  
  *
 12  
  * Unless required by applicable law or agreed to in writing, software
 13  
  * distributed under the License is distributed on an "AS IS" BASIS,
 14  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
 15  
  * implied. See the License for the specific language governing 
 16  
  * permissions and limitations under the License.
 17  
  */
 18  
 
 19  
 package org.simpleframework.xml.transform;
 20  
 
 21  
 import org.simpleframework.xml.core.PersistenceException;
 22  
 
 23  
 /**
 24  
  * The <code>TransformException</code> is thrown if a problem occurs
 25  
  * during the transformation of an object. This can be thrown either
 26  
  * because a transform could not be found for a specific type or
 27  
  * because the format of the text value had an invalid structure.
 28  
  * 
 29  
  * @author Niall Gallagher
 30  
  */
 31  
 public class TransformException extends PersistenceException {
 32  
    
 33  
    /**
 34  
     * Constructor for the <code>TransformException</code> object. 
 35  
     * This constructor takes a format string an a variable number of 
 36  
     * object arguments, which can be inserted into the format string. 
 37  
     * 
 38  
     * @param text a format string used to present the error message
 39  
     * @param list a list of arguments to insert into the string
 40  
     */     
 41  
    public TransformException(String text, Object... list) {
 42  2
       super(String.format(text, list));               
 43  2
    }       
 44  
 
 45  
    /**
 46  
     * Constructor for the <code>TransformException</code> object. 
 47  
     * This constructor takes a format string an a variable number of 
 48  
     * object arguments, which can be inserted into the format string. 
 49  
     * 
 50  
     * @param cause the source exception this is used to represent
 51  
     * @param text a format string used to present the error message
 52  
     * @param list a list of arguments to insert into the stri 
 53  
     */
 54  
    public TransformException(Throwable cause, String text, Object... list) {
 55  0
       super(String.format(text, list), cause);           
 56  0
    }  
 57  
 }