Skip to content

Commit b45ab20

Browse files
committed
Add getCode for error.
1 parent ccf1739 commit b45ab20

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ publishing {
4545

4646
publications {
4747
maven(MavenPublication) {
48-
version '0.1.1'
48+
version '0.1.2'
4949
group 'org.mushare'
5050
from components.java
5151
}

src/main/java/org/mushare/pluto/exception/PlutoError.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@ public class PlutoError extends Error {
44

55
private PlutoErrorCode code;
66

7+
public PlutoErrorCode getCode() {
8+
return code;
9+
}
10+
711
public PlutoError(PlutoErrorCode code) {
812
super(code.toString());
913
this.code = code;
1014
}
15+
1116
}

src/main/java/org/mushare/pluto/exception/PlutoException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package org.mushare.pluto.exception;
22

3-
public class PlutoException extends RuntimeException {
3+
public class PlutoException extends Exception {
44

55
private final PlutoError error;
66

0 commit comments

Comments
 (0)