From 6216ddaf988b9a6a776196964502f6ce9ec015a4 Mon Sep 17 00:00:00 2001 From: Nathan Bu <370788475@qq.com> Date: Mon, 4 Dec 2023 09:56:26 +0800 Subject: [PATCH] Update HandledErrorLog.java to improve naming (#566) ## Description ### Linked GitHub issue ID: # ## Pull Request Checklist - [ ] Tests for the changes have been added (for bug fixes / features) - [ ] Code compiles correctly with all tests are passed. - [ ] I've read the [contributing guide](https://github.com/microsoft/HydraLab/blob/main/CONTRIBUTING.md#making-changes-to-the-code) and followed the recommended practices. - [ ] [Wikis](https://github.com/microsoft/HydraLab/wiki) or [README](https://github.com/microsoft/HydraLab/blob/main/README.md) have been reviewed and added / updated if needed (for bug fixes / features) ### Does this introduce a breaking change? *If this introduces a breaking change for Hydra Lab users, please describe the impact and migration path.* - [ ] Yes - [ ] No ## How you tested it *Please make sure the change is tested, you can test it by adding UTs, do local test and share the screenshots, etc.* Please check the type of change your PR introduces: - [ ] Bugfix - [ ] Feature - [ ] Technical design - [ ] Build related changes - [ ] Refactoring (no functional changes, no api changes) - [ ] Code style update (formatting, renaming) or Documentation content changes - [ ] Other (please describe): ### Feature UI screenshots or Technical design diagrams *If this is a relatively large or complex change, kick it off by drawing the tech design with PlantUML and explaining why you chose the solution you did and what alternatives you considered, etc...* --- .../hydralab/common/appcenter/AppCenterErrorLogHandler.java | 2 +- .../hydralab/common/appcenter/entity/HandledErrorLog.java | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/com/microsoft/hydralab/common/appcenter/AppCenterErrorLogHandler.java b/common/src/main/java/com/microsoft/hydralab/common/appcenter/AppCenterErrorLogHandler.java index 34c524dd7..1eae0b21f 100644 --- a/common/src/main/java/com/microsoft/hydralab/common/appcenter/AppCenterErrorLogHandler.java +++ b/common/src/main/java/com/microsoft/hydralab/common/appcenter/AppCenterErrorLogHandler.java @@ -122,7 +122,7 @@ public HandledErrorLog createErrorLog(final Thread thread, final Throwable throw /* Uncaught exception or managed exception. */ errorLog.setFatal(fatal); if (!fatal) { - errorLog.setType(HandledErrorLog.TYPE); + errorLog.setType(HandledErrorLog.WARNING_TYPE); } /* Application launch time. */ diff --git a/common/src/main/java/com/microsoft/hydralab/common/appcenter/entity/HandledErrorLog.java b/common/src/main/java/com/microsoft/hydralab/common/appcenter/entity/HandledErrorLog.java index ff868d832..264ab577f 100644 --- a/common/src/main/java/com/microsoft/hydralab/common/appcenter/entity/HandledErrorLog.java +++ b/common/src/main/java/com/microsoft/hydralab/common/appcenter/entity/HandledErrorLog.java @@ -17,7 +17,7 @@ public class HandledErrorLog implements Log { /** * Log type. */ - public static final String TYPE = "handledError"; + public static final String WARNING_TYPE = "handledError"; /** * Exception associated to the error. @@ -47,6 +47,10 @@ public class HandledErrorLog implements Log { * The optional user identifier. */ private String userId; + /** + * "managedError" -> AppCenter Crash + * "handledError" -> AppCenter Error + */ private String type = "managedError"; /**