mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Made errors a little more helpful
Also, Hide stack traces when error message provided
This commit is contained in:
@@ -102,7 +102,8 @@ public class ContributionManager {
|
||||
} catch (IOException ioe) {
|
||||
if (progress != null)
|
||||
progress.error(ioe);
|
||||
ioe.printStackTrace();
|
||||
// Hiding stack trace. An error has been shown where needed.
|
||||
// ioe.printStackTrace();
|
||||
}
|
||||
if (progress != null)
|
||||
progress.finished();
|
||||
@@ -155,11 +156,26 @@ public class ContributionManager {
|
||||
}
|
||||
installProgress.finished();
|
||||
}
|
||||
else {
|
||||
if (downloadProgress.exception instanceof SocketTimeoutException) {
|
||||
status.setErrorMessage(Language
|
||||
.interpolate("contrib.errors.contrib_download.timeout",
|
||||
ad.getName()));
|
||||
} else {
|
||||
status.setErrorMessage(Language
|
||||
.interpolate("contrib.errors.download_and_install",
|
||||
ad.getName()));
|
||||
}
|
||||
}
|
||||
contribZip.delete();
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
status.setErrorMessage(Language.text("contrib.errors.download_and_install"));
|
||||
// Hiding stack trace. The error message ought to suffice.
|
||||
// e.printStackTrace();
|
||||
status
|
||||
.setErrorMessage(Language
|
||||
.interpolate("contrib.errors.download_and_install",
|
||||
ad.getName()));
|
||||
}
|
||||
} catch (IOException e) {
|
||||
status.setErrorMessage(Language.text("contrib.errors.temporary_directory"));
|
||||
|
||||
@@ -411,7 +411,6 @@ public class ContributionManagerDialog {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void setFilterText(String filter) {
|
||||
if (filter == null || filter.isEmpty()) {
|
||||
filterField.setText("");
|
||||
|
||||
@@ -269,15 +269,17 @@ contrib.messages.install_restart = Please restart Processing to finish installin
|
||||
contrib.messages.update_restart = Please restart Processing to finish updating this item.
|
||||
contrib.errors.list_download = Could not download the list of available contributions.
|
||||
contrib.errors.list_download.timeout = Connection timed out while downloading the contribution list.
|
||||
contrib.errors.download_and_install = Error during download and install.
|
||||
contrib.errors.download_and_install = Error during download and install of %s.
|
||||
contrib.errors.description_unavailable = Description unavailable.
|
||||
contrib.errors.malformed_url = "The link fetched from Processing.org is not valid.\nYou can still install this library manually by visiting\nthe library's website.
|
||||
contrib.errors.malformed_url = The link fetched from Processing.org is not valid.\nYou can still install this library manually by visiting\nthe library's website.
|
||||
contrib.errors.needs_repackage = %s needs to be repackaged according to the %s guidelines.
|
||||
contrib.errors.no_contribution_found = Could not find a %s in the downloaded file.
|
||||
contrib.errors.overwriting_properties = Error overwriting .properties file.
|
||||
contrib.errors.install_failed = Install failed.
|
||||
contrib.errors.update_on_restart_failed = Update on restart of %s failed.
|
||||
contrib.errors.temporary_directory = Could not write to temporary directory.
|
||||
contrib.errors.contrib_download.timeout = Connection timed out while downloading %s.
|
||||
contrib.errors.no_internet_connection = You don't seem to be connected to the Internet.
|
||||
contrib.all = All
|
||||
contrib.undo = Undo
|
||||
contrib.remove = Remove
|
||||
|
||||
Reference in New Issue
Block a user