123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- package com.xynet.pay.Exception;
- public class BusinessException extends RuntimeException
- {
- private static final long serialVersionUID = 5808616192752024016L;
- private String code;
- private Object[] args;
-
- public BusinessException()
- {
- }
-
- public BusinessException(String code, String msg)
- {
- super(msg);
- this.code = code;
- }
- public BusinessException(String code, String msg, Object[] _args)
- {
- super(msg);
- this.code = code;
- this.args = _args;
- }
- public BusinessException(Throwable exception)
- {
- super(exception);
- getExceptionCode(exception);
- }
-
- private void getExceptionCode(Throwable exception)
- {
- if ((exception instanceof BusinessException))
- {
- this.code = ((BusinessException)exception).getCode();
- }
- else
- {
- this.code = "999999";
- }
- }
-
- public String getCode() {
- return this.code;
- }
-
- public void setCode(String code) {
- this.code = code;
- }
-
- public Object[] getArgs() {
- return this.args;
- }
-
- public void setArgs(Object[] args) {
- this.args = args;
- }
- }
|