This is an automated email from the ASF dual-hosted git repository.
doebele pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/empire-db.git
The following commit(s) were added to refs/heads/master by this push:
new 4ec2b7fa EMPIREDB-431: UserLevelException: additional constructor (2)
4ec2b7fa is described below
commit 4ec2b7fa45daffa2ab62245a406df4f8df863085
Author: Rainer Döbele <[email protected]>
AuthorDate: Mon Jan 13 20:30:49 2025 +0100
EMPIREDB-431:
UserLevelException: additional constructor (2)
---
.../empire/db/exceptions/FieldValueException.java | 4 ++--
.../apache/empire/exceptions/UserLevelException.java | 19 +++++++++++++++----
2 files changed, 17 insertions(+), 6 deletions(-)
diff --git
a/empire-db/src/main/java/org/apache/empire/db/exceptions/FieldValueException.java
b/empire-db/src/main/java/org/apache/empire/db/exceptions/FieldValueException.java
index bade28a8..92c9cc3d 100644
---
a/empire-db/src/main/java/org/apache/empire/db/exceptions/FieldValueException.java
+++
b/empire-db/src/main/java/org/apache/empire/db/exceptions/FieldValueException.java
@@ -22,9 +22,9 @@ import org.apache.empire.commons.ErrorType;
import org.apache.empire.commons.StringUtils;
import org.apache.empire.data.Column;
import org.apache.empire.db.DBColumn;
-import org.apache.empire.exceptions.EmpireException;
+import org.apache.empire.exceptions.UserLevelException;
-public abstract class FieldValueException extends EmpireException
+public abstract class FieldValueException extends UserLevelException
{
private static final long serialVersionUID = 1L;
diff --git
a/empire-db/src/main/java/org/apache/empire/exceptions/UserLevelException.java
b/empire-db/src/main/java/org/apache/empire/exceptions/UserLevelException.java
index f5b48d89..f46c899b 100644
---
a/empire-db/src/main/java/org/apache/empire/exceptions/UserLevelException.java
+++
b/empire-db/src/main/java/org/apache/empire/exceptions/UserLevelException.java
@@ -16,15 +16,21 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.empire.db.exceptions;
+package org.apache.empire.exceptions;
import org.apache.empire.commons.ErrorType;
-import org.apache.empire.exceptions.EmpireException;
/**
* UserLevelException
- * An exception of this type indicates an error that should be displayed to
the user only
- * and does not need to be logged
+ *
+ * This class may be used either a base class
+ * or a wrapper class for other exceptions.
+ *
+ * Its purpose is to serve as an indicator that an exception
+ * was caused by user input or user action and thus
+ * should be directly displayed to the user
+ * and does not necessarily need to be logged.
+ *
* @author doebele
*/
public class UserLevelException extends EmpireException
@@ -36,6 +42,11 @@ public class UserLevelException extends EmpireException
super(errType, params);
}
+ protected UserLevelException(ErrorType errType, String[] params, Throwable
cause)
+ {
+ super(errType, params, cause);
+ }
+
public UserLevelException(EmpireException e)
{
super(e.getErrorType(), e.getErrorParams(), e);