Skip to content

Commit

Permalink
Replace usages of Throwable with Exception (#2310)
Browse files Browse the repository at this point in the history
  • Loading branch information
lenhard authored and Siedlerchr committed Nov 23, 2016
1 parent ee49460 commit 25ecb60
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/main/java/net/sf/jabref/gui/actions/BaseAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
@FunctionalInterface
public interface BaseAction {

void action() throws Throwable;
void action() throws Exception;
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public CopyBibTeXKeyAndLinkAction(MainTable mainTable) {
}

@Override
public void action() throws Throwable {
public void action() throws Exception {
List<BibEntry> entries = mainTable.getSelectedEntries();
if (!entries.isEmpty()) {
StringBuilder sb = new StringBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public void run() {
}

@Override
public void init() throws Throwable {
public void init() throws Exception {
panel.output(Localization.lang("Resolving duplicate BibTeX keys..."));

}
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/net/sf/jabref/gui/exporter/SaveDatabaseAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public SaveDatabaseAction(BasePanel panel, Path filePath) {
}

@Override
public void init() throws Throwable {
public void init() throws Exception {
success = false;
canceled = false;
fileLockedError = false;
Expand Down Expand Up @@ -280,7 +280,7 @@ private boolean saveDatabase(File file, boolean selectedOnly, Charset encoding)
* Run the "Save" operation. This method offloads the actual save operation to a background thread, but
* still runs synchronously using Spin (the method returns only after completing the operation).
*/
public void runCommand() throws Throwable {
public void runCommand() throws Exception {
// This part uses Spin's features:
Worker worker = getWorker();
// The Worker returned by getWorker() has been wrapped
Expand All @@ -300,12 +300,12 @@ public void runCommand() throws Throwable {
callback.update(); // Runs the update() method on the EDT.
}

public void save() throws Throwable {
public void save() throws Exception {
runCommand();
frame.updateEnabledState();
}

public void saveAs() throws Throwable {
public void saveAs() throws Exception {
// configure file dialog
FileDialog dialog = new FileDialog(frame);
dialog.withExtension(FileExtensions.BIBTEX_DB);
Expand All @@ -324,7 +324,7 @@ public void saveAs() throws Throwable {
* Run the "Save as" operation. This method offloads the actual save operation to a background thread, but
* still runs synchronously using Spin (the method returns only after completing the operation).
*/
public void saveAs(File file) throws Throwable {
public void saveAs(File file) throws Exception {
BibDatabaseContext context = panel.getBibDatabaseContext();

if (context.getLocation() == DatabaseLocation.SHARED) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public FindFullTextAction(BasePanel basePanel) {
}

@Override
public void init() throws Throwable {
public void init() throws Exception {
basePanel.output(Localization.lang("Looking for full text document..."));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public GroupAddRemoveDialog(BasePanel panel, boolean add, boolean move) {
}

@Override
public void action() throws Throwable {
public void action() throws Exception {
Optional<GroupTreeNode> groups = panel.getBibDatabaseContext().getMetaData().getGroups();
if (!groups.isPresent()) {
return;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/sf/jabref/gui/worker/AbstractWorker.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public AbstractWorker() {

}

public void init() throws Throwable {
public void init() throws Exception {
// Do nothing
}

Expand Down

0 comments on commit 25ecb60

Please sign in to comment.