| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| InvalidFormatException |
|
| 0.0;0 |
| 1 | /* | |
| 2 | * InvalidFormatException.java May 2007 | |
| 3 | * | |
| 4 | * Copyright (C) 2007, Niall Gallagher <niallg@users.sf.net> | |
| 5 | * | |
| 6 | * This library is free software; you can redistribute it and/or | |
| 7 | * modify it under the terms of the GNU Lesser General Public | |
| 8 | * License as published by the Free Software Foundation. | |
| 9 | * | |
| 10 | * This library is distributed in the hope that it will be useful, | |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 13 | * GNU Lesser General Public License for more details. | |
| 14 | * | |
| 15 | * You should have received a copy of the GNU Lesser General | |
| 16 | * Public License along with this library; if not, write to the | |
| 17 | * Free Software Foundation, Inc., 59 Temple Place, Suite 330, | |
| 18 | * Boston, MA 02111-1307 USA | |
| 19 | */ | |
| 20 | ||
| 21 | package org.simpleframework.xml.transform; | |
| 22 | ||
| 23 | /** | |
| 24 | * The <code>InvalidFormatException</code> is thrown when there is | |
| 25 | * a format exception. This exception this will be thrown from the | |
| 26 | * <code>Transformer</code> should serialization or deserialization | |
| 27 | * of an object fail. Error messages provided to this exception are | |
| 28 | * formatted similar to the <code>PrintStream.printf</code> method. | |
| 29 | * | |
| 30 | * @author Niall Gallagher | |
| 31 | */ | |
| 32 | public class InvalidFormatException extends TransformException { | |
| 33 | ||
| 34 | /** | |
| 35 | * Constructor for the <code>InvalidFormatException</code> object. | |
| 36 | * This constructor takes a format string an a variable number of | |
| 37 | * object arguments, which can be inserted into the format string. | |
| 38 | * | |
| 39 | * @param text a format string used to present the error message | |
| 40 | * @param list a list of arguments to insert into the string | |
| 41 | */ | |
| 42 | public InvalidFormatException(String text, Object... list) { | |
| 43 | 1 | super(String.format(text, list)); |
| 44 | 1 | } |
| 45 | ||
| 46 | /** | |
| 47 | * Constructor for the <code>InvalidFormatException</code> object. | |
| 48 | * This constructor takes a format string an a variable number of | |
| 49 | * object arguments, which can be inserted into the format string. | |
| 50 | * | |
| 51 | * @param cause the source exception this is used to represent | |
| 52 | * @param text a format string used to present the error message | |
| 53 | * @param list a list of arguments to insert into the stri | |
| 54 | */ | |
| 55 | public InvalidFormatException(Throwable cause, String text, Object... list) { | |
| 56 | 0 | super(String.format(text, list), cause); |
| 57 | 0 | } |
| 58 | } |