public abstract class BaseSystemException extends RuntimeException implements BaseException
| 限定符和类型 | 字段和说明 |
|---|---|
protected String[] |
args
异常消息信息参数
|
protected String |
database
数据库(默认mysql)
|
protected String |
message
异常消息信息
|
protected Throwable |
throwable
实际的异常
|
COMMON_EXCEPTION_MESSAGE, MYSQL_DATABASE, ORACLE_DATABASE| 构造器和说明 |
|---|
BaseSystemException(String msg) |
BaseSystemException(String msg,
Throwable t) |
BaseSystemException(String msg,
Throwable t,
String... args) |
BaseSystemException(Throwable t) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected String |
getCommonMessage(Throwable t)
获取JAVA公共异常信息
|
String |
getMessage()
获得异常消息信息。
|
protected String |
getSQLException(Throwable t)
获取SQL异常信息
|
protected String |
getSQLException(Throwable t,
Properties parse)
从properties文件获取SQL异常信息
|
Throwable |
getThrowable()
获得实际产生的异常。
|
void |
setDatabase(String database)
设置数据库信息
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetMessageprotected String message
protected String[] args
protected Throwable throwable
protected String database
public BaseSystemException(String msg)
public BaseSystemException(Throwable t)
public String getMessage()
BaseException获得异常消息信息。
getMessage 在接口中 BaseExceptiongetMessage 在类中 Throwablepublic Throwable getThrowable()
BaseException获得实际产生的异常。
getThrowable 在接口中 BaseExceptionpublic void setDatabase(String database)
BaseExceptionsetDatabase 在接口中 BaseExceptiondatabase - 数据库protected String getSQLException(Throwable t, Properties parse)
t - 异常parse - SQL异常properties文件内容Copyright © 2019. All rights reserved.