-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
94 additions
and
55 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
apollo-core/src/main/java/com/ctrip/apollo/core/exception/AbstractBaseException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.ctrip.apollo.core.exception; | ||
|
||
public abstract class AbstractBaseException extends RuntimeException{ | ||
|
||
/** | ||
* | ||
*/ | ||
private static final long serialVersionUID = -1713129594004951820L; | ||
|
||
private String errorCode; | ||
|
||
public AbstractBaseException(){ | ||
|
||
} | ||
|
||
public AbstractBaseException(String str){ | ||
super(str); | ||
} | ||
|
||
public AbstractBaseException(String str, String errorCode){ | ||
super(str); | ||
this.setErrorCode(errorCode); | ||
} | ||
|
||
public String getErrorCode() { | ||
return errorCode; | ||
} | ||
|
||
public void setErrorCode(String errorCode) { | ||
this.errorCode = errorCode; | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
apollo-core/src/main/java/com/ctrip/apollo/core/exception/BadRequestException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.ctrip.apollo.core.exception; | ||
|
||
public class BadRequestException extends AbstractBaseException { | ||
|
||
/** | ||
* | ||
*/ | ||
private static final long serialVersionUID = 6060826407312134068L; | ||
|
||
|
||
public BadRequestException(String str) { | ||
super(str); | ||
} | ||
} |
9 changes: 3 additions & 6 deletions
9
apollo-core/src/main/java/com/ctrip/apollo/core/exception/NotFoundException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,13 @@ | ||
package com.ctrip.apollo.core.exception; | ||
|
||
public class NotFoundException extends RuntimeException { | ||
public class NotFoundException extends AbstractBaseException { | ||
/** | ||
* | ||
*/ | ||
private static final long serialVersionUID = 7611357629749481796L; | ||
|
||
public NotFoundException(){ | ||
|
||
} | ||
|
||
public NotFoundException(String str){ | ||
|
||
public NotFoundException(String str) { | ||
super(str); | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
apollo-core/src/main/java/com/ctrip/apollo/core/exception/ServiceException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters