Skip to content

Commit 9f082fe

Browse files
[fit] The FitException decorator encapsulates Throwable exception information data. (ModelEngine-Group#174)
(cherry picked from commit a2e727a)
1 parent 140671b commit 9f082fe

File tree

1 file changed

+2
-2
lines changed
  • framework/fit/java/fit-api/src/main/java/modelengine/fitframework/exception

1 file changed

+2
-2
lines changed

framework/fit/java/fit-api/src/main/java/modelengine/fitframework/exception/FitException.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ public String associatedFitableId() {
201201
* @return 表示包装的 FIT 通用异常的 {@link FitException}。
202202
*/
203203
public static FitException wrap(@Nonnull Throwable cause, String genericableId) {
204-
return wrap(cause, genericableId, StringUtils.EMPTY);
204+
return wrap(cause, genericableId, cause.getMessage());
205205
}
206206

207207
/**
@@ -213,7 +213,7 @@ public static FitException wrap(@Nonnull Throwable cause, String genericableId)
213213
* @return 表示包装的 FIT 通用异常的 {@link FitException}。
214214
*/
215215
public static FitException wrap(@Nonnull Throwable cause, String genericableId, String fitableId) {
216-
return wrap(cause, genericableId, fitableId, StringUtils.EMPTY);
216+
return wrap(cause, genericableId, fitableId, cause.getMessage());
217217
}
218218

219219
/**

0 commit comments

Comments
 (0)