net.smartlab.web.BusinessException Maven / Gradle / Ivy
/*
* The SmartWeb Framework
* Copyright (C) 2004-2006
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* For further informations on the SmartWeb Framework please visit
*
* http://smartweb.sourceforge.net
*/
package net.smartlab.web;
/**
* A BusinessException is thrown whenever an application tries to perform a
* business operation but the request cannot be accomplished for some reason.
*
* @author rlogiacco
*/
public class BusinessException extends Exception {
private static final long serialVersionUID = -8937869317112676920L;
/**
* Instantiates the class with a message. The providen message is used as a
* key and searched in available resource bundles. If the message is not a
* valid resource key than it's used directly.
*
* @param message the key to be searched in resource bundles.
*/
public BusinessException(String message) {
super(message);
}
/**
* Instantiates the class with a message and a parameter. The providen
* message is used as a key and searched in available resource bundles. If
* the message is not a valid resource key than it's used directly.
*
* @param message the key to be searched in resource bundles.
* @param param an object to be used for param substitution.
*/
public BusinessException(String message, Object param) {
this(message, new Object[] { param });
}
/**
* Instantiates the class with a message and two parameters. The providen
* message is used as a key and searched in available resource bundles. If
* the message is not a valid resource key than it's used directly.
*
* @param message the key to be searched in resource bundles.
* @param param1 an object to be used for param substitution.
* @param param2 an object to be used for param substitution.
*/
public BusinessException(String message, Object param1, Object param2) {
this(message, new Object[] { param1, param2 });
}
/**
* Instantiates the class with a message and three parameters. The providen
* message is used as a key and searched in available resource bundles. If
* the message is not a valid resource key than it's used directly.
*
* @param message the key to be searched in resource bundles.
* @param param1 an object to be used for param substitution.
* @param param2 an object to be used for param substitution.
* @param param3 an object to be used for param substitution.
*/
public BusinessException(String message, Object param1, Object param2, Object param3) {
this(message, new Object[] { param1, param2, param3});
}
/**
* Instantiates the class with a message and four parameters. The providen
* message is used as a key and searched in available resource bundles. If
* the message is not a valid resource key than it's used directly.
*
* @param message the key to be searched in resource bundles.
* @param param1 an object to be used for param substitution.
* @param param2 an object to be used for param substitution.
* @param param3 an object to be used for param substitution.
* @param param4 an object to be used for param substitution.
*/
public BusinessException(String message, Object param1, Object param2, Object param3, Object param4) {
this(message, new Object[] { param1, param2, param3, param4 });
}
/**
* Instantiates the class with a message and an array of parameters. The
* providen message is used as a key and searched in available resource
* bundles. If the message is not a valid resource key than it's used
* directly.
*
* @param message the key to be searched in resource bundles.
* @param params a set of objects for param substitution.
*/
public BusinessException(String message, Object[] params) {
super(message);
}
/**
* Default empty constructor.
*/
public BusinessException() {
super();
}
/**
* Constructs a new instance with the specified cause.
*
* @param cause the throwable
instance wich generated this
* exception.
*/
public BusinessException(Throwable cause) {
super(cause);
}
/**
* Constructs a new instance with the specified describing message and
* cause.
*
* @param message the description of the occurred exception.
* @param cause the throwable
instance wich generated this
* exception.
*/
public BusinessException(String message, Throwable cause) {
super(message, cause);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy