Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace usages of Throwable with Exception #2310

Merged
merged 1 commit into from
Nov 23, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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