forked from j62/ctbrec
Improve exception handling
Make sure, the status is reset to FINISHED, if something goes wrong while downloading, so that the context menu is reactivated
This commit is contained in:
parent
1383199532
commit
f30d13609b
|
@ -373,6 +373,13 @@ public class RecordingsTab extends Tab implements TabSelectionListener {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} catch (FileNotFoundException e) {
|
||||||
|
showErrorDialog("Error while downloading recording", "The target file couldn't be created", e);
|
||||||
|
LOG.error("Error while downloading recording", e);
|
||||||
|
} catch (IOException e) {
|
||||||
|
showErrorDialog("Error while downloading recording", "The recording could not be downloaded", e);
|
||||||
|
LOG.error("Error while downloading recording", e);
|
||||||
|
} finally {
|
||||||
Platform.runLater(new Runnable() {
|
Platform.runLater(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
@ -380,12 +387,6 @@ public class RecordingsTab extends Tab implements TabSelectionListener {
|
||||||
recording.setProgress(-1);
|
recording.setProgress(-1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (FileNotFoundException e) {
|
|
||||||
showErrorDialog("Error while downloading recording", "The target file couldn't be created", e);
|
|
||||||
LOG.error("Error while downloading recording", e);
|
|
||||||
} catch (IOException e) {
|
|
||||||
showErrorDialog("Error while downloading recording", "The recording could not be downloaded", e);
|
|
||||||
LOG.error("Error while downloading recording", e);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue