Skip to content

Commit fcd6336

Browse files
committed
Don't wrap a RunnerException in a redundant RunnerException.
1 parent b5fe1b1 commit fcd6336

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app/src/cc/arduino/packages/uploaders/SerialUploader.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ public boolean uploadUsingPreferences(File sourcePath, String buildPath, String
121121
String pattern = prefs.getOrExcept("upload.pattern");
122122
String[] cmd = StringReplacer.formatAndSplit(pattern, prefs, true);
123123
uploadResult = executeUploadCommand(cmd);
124+
} catch (RunnerException e) {
125+
throw e;
124126
} catch (Exception e) {
125127
throw new RunnerException(e);
126128
}
@@ -228,6 +230,8 @@ public boolean uploadUsingProgrammer(String buildPath, String className) throws
228230
String pattern = prefs.getOrExcept("program.pattern");
229231
String[] cmd = StringReplacer.formatAndSplit(pattern, prefs, true);
230232
return executeUploadCommand(cmd);
233+
} catch (RunnerException e) {
234+
throw e;
231235
} catch (Exception e) {
232236
throw new RunnerException(e);
233237
}
@@ -287,6 +291,8 @@ public boolean burnBootloader() throws Exception {
287291
pattern = prefs.getOrExcept("bootloader.pattern");
288292
cmd = StringReplacer.formatAndSplit(pattern, prefs, true);
289293
return executeUploadCommand(cmd);
294+
} catch (RunnerException e) {
295+
throw e;
290296
} catch (Exception e) {
291297
throw new RunnerException(e);
292298
}

0 commit comments

Comments
 (0)