From 221f6b779245a86b8ac370edbae3f35c86860dc8 Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Tue, 11 Nov 2014 07:04:17 +0100 Subject: [PATCH] Normalize Exception methods. --- .../util/xml/XMLBadFormatException.java | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/fr/devinsy/util/xml/XMLBadFormatException.java b/src/fr/devinsy/util/xml/XMLBadFormatException.java index 9624a49..268c1f0 100644 --- a/src/fr/devinsy/util/xml/XMLBadFormatException.java +++ b/src/fr/devinsy/util/xml/XMLBadFormatException.java @@ -18,6 +18,8 @@ */ package fr.devinsy.util.xml; +import org.slf4j.helpers.MessageFormatter; + /** * * @author Christian Pierre MOMON (christian.momon@devinsy.fr) @@ -47,4 +49,33 @@ public class XMLBadFormatException extends Exception { super(message, exception); } + + /** + * + * @param format + * @param arguments + */ + public XMLBadFormatException(final String format, final Object... arguments) + { + this(MessageFormatter.arrayFormat(format, arguments).getMessage()); + } + + /** + * + * @param message + * @param cause + */ + public XMLBadFormatException(final String message, final Throwable cause) + { + super(message, cause); + } + + /** + * + * @param cause + */ + public XMLBadFormatException(final Throwable cause) + { + super(cause); + } }