diff options
author | Luck <git@lucko.me> | 2022-02-06 21:02:28 +0000 |
---|---|---|
committer | Luck <git@lucko.me> | 2022-02-06 21:02:28 +0000 |
commit | 8a39ad426ca4fe1f5ef39fc5b0b538937802a001 (patch) | |
tree | ce5ffef0b7ed42833675d464fdffa603b43d65f6 /spark-common/src/main/java/me | |
parent | 9639aefcb87770d9bf00e8caf4c10d33244e24e0 (diff) | |
download | spark-8a39ad426ca4fe1f5ef39fc5b0b538937802a001.tar.gz spark-8a39ad426ca4fe1f5ef39fc5b0b538937802a001.tar.bz2 spark-8a39ad426ca4fe1f5ef39fc5b0b538937802a001.zip |
Catch any exception when uploading data (#171)
Diffstat (limited to 'spark-common/src/main/java/me')
-rw-r--r-- | spark-common/src/main/java/me/lucko/spark/common/command/modules/HeapAnalysisModule.java | 2 | ||||
-rw-r--r-- | spark-common/src/main/java/me/lucko/spark/common/command/modules/SamplerModule.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/spark-common/src/main/java/me/lucko/spark/common/command/modules/HeapAnalysisModule.java b/spark-common/src/main/java/me/lucko/spark/common/command/modules/HeapAnalysisModule.java index 491ec1e..1030f35 100644 --- a/spark-common/src/main/java/me/lucko/spark/common/command/modules/HeapAnalysisModule.java +++ b/spark-common/src/main/java/me/lucko/spark/common/command/modules/HeapAnalysisModule.java @@ -111,7 +111,7 @@ public class HeapAnalysisModule implements CommandModule { ); platform.getActivityLog().addToLog(Activity.urlActivity(sender, System.currentTimeMillis(), "Heap dump summary", url)); - } catch (IOException e) { + } catch (Exception e) { resp.broadcastPrefixed(text("An error occurred whilst uploading the data. Attempting to save to disk instead.", RED)); e.printStackTrace(); saveToFile = true; diff --git a/spark-common/src/main/java/me/lucko/spark/common/command/modules/SamplerModule.java b/spark-common/src/main/java/me/lucko/spark/common/command/modules/SamplerModule.java index 26f20e7..970d062 100644 --- a/spark-common/src/main/java/me/lucko/spark/common/command/modules/SamplerModule.java +++ b/spark-common/src/main/java/me/lucko/spark/common/command/modules/SamplerModule.java @@ -324,7 +324,7 @@ public class SamplerModule implements CommandModule { ); platform.getActivityLog().addToLog(Activity.urlActivity(resp.sender(), System.currentTimeMillis(), "Profiler", url)); - } catch (IOException e) { + } catch (Exception e) { resp.broadcastPrefixed(text("An error occurred whilst uploading the results. Attempting to save to disk instead.", RED)); e.printStackTrace(); saveToFile = true; |