avoid catch (Throwable)
diff --git a/plugins/org.eclipse.wst.common.emf/workbench/org/eclipse/wst/common/internal/emf/ResourceSynchronizedIsLoadingAdapter.java b/plugins/org.eclipse.wst.common.emf/workbench/org/eclipse/wst/common/internal/emf/ResourceSynchronizedIsLoadingAdapter.java
index f536105..aa6acf7 100644
--- a/plugins/org.eclipse.wst.common.emf/workbench/org/eclipse/wst/common/internal/emf/ResourceSynchronizedIsLoadingAdapter.java
+++ b/plugins/org.eclipse.wst.common.emf/workbench/org/eclipse/wst/common/internal/emf/ResourceSynchronizedIsLoadingAdapter.java
@@ -15,98 +15,103 @@
-
-
/**
- * The ResourceSynchronizedIsLoadingAdapter is used to synchronize the loading
+ * The ResourceSynchronizedIsLoadingAdapter is used to synchronize the loading
* of EMF resources. This is the Eclipse version of ResourceIsLoadingAdapter,
- * and uses the Eclipse ILock technology to acquire a semaphore until the
+ * and uses the Eclipse ILock technology to acquire a semaphore until the
* Resource is loaded. the waitForResourceToLoad() method will pause until
- * either (a) the Resource has loaded, the Adapter is notified, and the
+ * either (a) the Resource has loaded, the Adapter is notified, and the
* semaphore is released or (b) the DELAY timeout is exceeded, which prevents
- * full deadlock.
+ * full deadlock.
*
- * @author mdelder
+ * @author mdelder
*/
public class ResourceSynchronizedIsLoadingAdapter extends ResourceIsLoadingAdapter {
-
- private final ILock loadingLock;
-
- /**
- * The delay is default to 5 minutes. This is the upward threshhold. The lock
- * will wait up to DELAY milliseconds to acquire the lock, and bail if not. It
- * does not mean that it will wait DELAY milliseconds always. In general, the
- * wait should be almost instanteous -- just as long as document loading remains
- * speedy.
- */
- private static final long DELAY = 300000;
-
- public ResourceSynchronizedIsLoadingAdapter() {
- loadingLock = Platform.getJobManager().newLock();
- if(loadingLock != null)
- loadingLock.acquire();
- }
-
-
- /* (non-Javadoc)
- * @see com.ibm.wtp.internal.emf.utilities.ResourceIsLoadingAdapter#waitForResourceToLoad()
- */
- public void waitForResourceToLoad() {
-
- if(loadingLock == null)
- return;
-
- boolean lockAcquired = false;
- try {
- if( loadingLock != null )
- if( !(lockAcquired = loadingLock.acquire(DELAY)) )
- logWarning();
- } catch (Throwable t) {
- } finally {
- if(lockAcquired)
- loadingLock.release();
- }
-
- }
-
-
- /**
- *
- */
- private void logWarning() {
- Notifier target = getTarget();
- if(target == null || !(target instanceof Resource)) {
- Resource resource = (Resource) target;
- System.err.println("[WARNING] Could not acquire Semaphore Lock for Resource: \""+resource.getURI() + "\" in " + getClass());
- }
-
- }
+
+ private final ILock loadingLock;
+
+ /**
+ * The delay is default to 5 minutes. This is the upward threshhold. The
+ * lock will wait up to DELAY milliseconds to acquire the lock, and bail
+ * if not. It does not mean that it will wait DELAY milliseconds always.
+ * In general, the wait should be almost instanteous -- just as long as
+ * document loading remains speedy.
+ */
+ private static final long DELAY = 300000;
+
+ public ResourceSynchronizedIsLoadingAdapter() {
+ loadingLock = Platform.getJobManager().newLock();
+ if (loadingLock != null)
+ loadingLock.acquire();
+ }
- /* (non-Javadoc)
- * @see com.ibm.wtp.internal.emf.utilities.ResourceIsLoadingAdapter#notifyChanged(org.eclipse.emf.common.notify.Notification)
- */
- public void notifyChanged(Notification notification) {
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.ibm.wtp.internal.emf.utilities.ResourceIsLoadingAdapter#waitForResourceToLoad()
+ */
+ public void waitForResourceToLoad() {
- if (notification.getNotifier() != null) {
- //listen for the remove of the loading adapter
+ if (loadingLock == null)
+ return;
+
+ boolean lockAcquired = false;
+ try {
+ if (loadingLock != null)
+ if (!(lockAcquired = loadingLock.acquire(DELAY)))
+ logWarning();
+ }
+ catch (InterruptedException e) {
+ // ignore, just continue
+ }
+ finally {
+ if (lockAcquired)
+ loadingLock.release();
+ }
+
+ }
+
+
+ /**
+ *
+ */
+ private void logWarning() {
+ Notifier target = getTarget();
+ if (target == null || !(target instanceof Resource)) {
+ Resource resource = (Resource) target;
+ System.err.println("[WARNING] Could not acquire Semaphore Lock for Resource: \"" + resource.getURI() + "\" in " + getClass());
+ }
+
+ }
+
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.ibm.wtp.internal.emf.utilities.ResourceIsLoadingAdapter#notifyChanged(org.eclipse.emf.common.notify.Notification)
+ */
+ public void notifyChanged(Notification notification) {
+
+ if (notification.getNotifier() != null) {
+ // listen for the remove of the loading adapter
if (isSetLoadedResourceNotification(notification)) {
- if(loadingLock != null)
- loadingLock.release();
- removeIsLoadingSupport();
+ if (loadingLock != null)
+ loadingLock.release();
+ removeIsLoadingSupport();
}
- }
- }
-
-
- /* (non-Javadoc)
- * @see com.ibm.wtp.internal.emf.utilities.ResourceIsLoadingAdapter#forceRelease()
- */
- public void forceRelease() {
- try {
- if(loadingLock != null && loadingLock.getDepth() > 0)
- loadingLock.release();
- } catch(Throwable t) {}
- }
+ }
+ }
+
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.ibm.wtp.internal.emf.utilities.ResourceIsLoadingAdapter#forceRelease()
+ */
+ public void forceRelease() {
+ if (loadingLock != null && loadingLock.getDepth() > 0)
+ loadingLock.release();
+ }
}
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMAdapterImpl.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMAdapterImpl.java
index 7b5a265..6230f95 100644
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMAdapterImpl.java
+++ b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMAdapterImpl.java
@@ -649,7 +649,7 @@
try {
removeDOMChild(parentNode, childNode, false);
parentNode.insertBefore(childNode, insertBeforeNode);
- } catch (Throwable e) {
+ } catch (Exception e) {
e.printStackTrace();
}
}
@@ -686,7 +686,7 @@
if (removeAdapter)
removeAdapters(childNode);
parentNode.removeChild(childNode);
- } catch (Throwable e) {
+ } catch (Exception e) {
e.printStackTrace();
}
}
diff --git a/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/datamodel/ui/DataModelWizard.java b/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/datamodel/ui/DataModelWizard.java
index 3f15bec..a8ed8d2 100644
--- a/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/datamodel/ui/DataModelWizard.java
+++ b/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/datamodel/ui/DataModelWizard.java
@@ -186,7 +186,7 @@
postPerformFinish();
}
- } catch (Throwable exc) {
+ } catch (Exception exc) {
WTPUIPlugin.log(exc);
ErrorDialog.openError(getShell(), WTPCommonUIResourceHandler.getString(WTPCommonUIResourceHandler.WTPWizard_UI_0, new Object[]{getWindowTitle()}), WTPCommonUIResourceHandler.getString(WTPCommonUIResourceHandler.WTPWizard_UI_1, new Object[]{getWindowTitle()}), exc, 0, false);
} finally {
diff --git a/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/PageGroupManager.java b/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/PageGroupManager.java
index 620c43e..8ee2efb 100644
--- a/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/PageGroupManager.java
+++ b/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/PageGroupManager.java
@@ -113,7 +113,7 @@
try {
pageFound = findNextPage(true);
- } catch (Throwable exc) {
+ } catch (Exception exc) {
Logger.getLogger().logError(exc);
if (rootOperation != null) {
try {
@@ -390,7 +390,7 @@
try {
newPageId = pageGroupEntry.getPageHandler().getNextPage(pageId, expectedId);
- } catch (Throwable exc) {
+ } catch (Exception exc) {
Logger.getLogger().logError(exc);
}
@@ -411,7 +411,7 @@
try {
nextGroupID = pageGroupEntry.getPageGroupHandler().getNextPageGroup(afterId, groupIDList);
- } catch (Throwable exc) {
+ } catch (Exception exc) {
Logger.getLogger().logError(exc);
}
@@ -490,7 +490,7 @@
try {
pageHandler = pageGroup.getPageHandler(dataModel);
pageGroupHandler = pageGroup.getPageGroupHandler(dataModel);
- } catch (Throwable exc) {
+ } catch (Exception exc) {
Logger.getLogger().logError(exc);
}
diff --git a/plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/Cache.java b/plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/Cache.java
index 20cd05f..399f421 100644
--- a/plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/Cache.java
+++ b/plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/Cache.java
@@ -229,7 +229,7 @@
}
}
- catch(Throwable t)
+ catch(Exception t)
{
// Put the entry in the uncached list so the resolution work will not be performed again.
// TODO: Add in a timeout for the non-located uris.
diff --git a/plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/LicenseAcceptanceDialog.java b/plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/LicenseAcceptanceDialog.java
index 562a74e..d9bc3c1 100644
--- a/plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/LicenseAcceptanceDialog.java
+++ b/plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/LicenseAcceptanceDialog.java
@@ -229,7 +229,7 @@
licenseText2.setText(CacheMessages._UI_CACHE_DIALOG_LICENSE_STATEMENT2);
}
- catch(Throwable e)
+ catch(Exception e)
{
// The browser throws an exception on platforms that do not support it.
// In this case we need to create an external browser.
diff --git a/plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/preferences/CachePreferencePage.java b/plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/preferences/CachePreferencePage.java
index 896fac1..4ac9667 100644
--- a/plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/preferences/CachePreferencePage.java
+++ b/plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/preferences/CachePreferencePage.java
@@ -250,9 +250,10 @@
}
});
- } catch (Throwable e)
+ } catch (Exception e)
{
- //TODO: Log error
+ //TODO: Log error
+ e.printStackTrace();
}
setPreferenceWidgets();
applyDialogFont(composite);
diff --git a/plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ValidationMenuAction.java b/plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ValidationMenuAction.java
index d2a5d13..aa2c48d 100644
--- a/plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ValidationMenuAction.java
+++ b/plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ValidationMenuAction.java
@@ -334,7 +334,7 @@
cancelled = true;
String message = ResourceHandler.getExternalizedMessage(ResourceConstants.VBF_UI_RESCANCELLED, new String[]{project.getName()});
monitor.setTaskName(message);
- } catch (Throwable exc) {
+ } catch (Exception exc) {
logException(monitor, project, exc);
}
}
diff --git a/plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ValidationPreferencePage.java b/plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ValidationPreferencePage.java
index 3487d6c..72424b0 100644
--- a/plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ValidationPreferencePage.java
+++ b/plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ValidationPreferencePage.java
@@ -1042,7 +1042,7 @@
} catch (InvocationTargetException exc) {
_pageImpl = new InvalidPage(parent);
displayAndLogError(ResourceHandler.getExternalizedMessage(ResourceConstants.VBF_EXC_INTERNAL_TITLE), ResourceHandler.getExternalizedMessage(ResourceConstants.VBF_EXC_INTERNAL_PAGE), exc);
- } catch (Throwable exc) {
+ } catch (Exception exc) {
_pageImpl = new InvalidPage(parent);
displayAndLogError(ResourceHandler.getExternalizedMessage(ResourceConstants.VBF_EXC_INTERNAL_TITLE), ResourceHandler.getExternalizedMessage(ResourceConstants.VBF_EXC_INTERNAL_PAGE), exc);
}
@@ -1050,7 +1050,7 @@
} catch (InvocationTargetException exc) {
_pageImpl = new InvalidPage(parent);
displayAndLogError(ResourceHandler.getExternalizedMessage(ResourceConstants.VBF_EXC_INTERNAL_TITLE), ResourceHandler.getExternalizedMessage(ResourceConstants.VBF_EXC_INTERNAL_PAGE), exc);
- } catch (Throwable exc) {
+ } catch (Exception exc) {
_pageImpl = new InvalidPage(parent);
displayAndLogError(ResourceHandler.getExternalizedMessage(ResourceConstants.VBF_EXC_INTERNAL_TITLE), ResourceHandler.getExternalizedMessage(ResourceConstants.VBF_EXC_INTERNAL_PAGE), exc);
}
@@ -1083,7 +1083,7 @@
_pageImpl.performDefaults();
} catch (InvocationTargetException exc) {
displayAndLogError(ResourceHandler.getExternalizedMessage(ResourceConstants.VBF_EXC_INTERNAL_TITLE), ResourceHandler.getExternalizedMessage(ResourceConstants.VBF_EXC_INTERNAL_PAGE), exc);
- } catch (Throwable exc) {
+ } catch (Exception exc) {
displayAndLogError(ResourceHandler.getExternalizedMessage(ResourceConstants.VBF_EXC_INTERNAL_TITLE), ResourceHandler.getExternalizedMessage(ResourceConstants.VBF_EXC_INTERNAL_PAGE), exc);
}
}
@@ -1100,7 +1100,7 @@
} catch (InvocationTargetException exc) {
displayAndLogError(ResourceHandler.getExternalizedMessage(ResourceConstants.VBF_EXC_INTERNAL_TITLE), ResourceHandler.getExternalizedMessage(ResourceConstants.VBF_EXC_INTERNAL_PAGE), exc);
return false;
- } catch (Throwable exc) {
+ } catch (Exception exc) {
displayAndLogError(ResourceHandler.getExternalizedMessage(ResourceConstants.VBF_EXC_INTERNAL_TITLE), ResourceHandler.getExternalizedMessage(ResourceConstants.VBF_EXC_INTERNAL_PAGE), exc);
return false;
}
@@ -1117,7 +1117,7 @@
if (_pageImpl != null) {
_pageImpl.dispose();
}
- } catch (Throwable exc) {
+ } catch (Exception exc) {
displayAndLogError(ResourceHandler.getExternalizedMessage(ResourceConstants.VBF_EXC_INTERNAL_TITLE), ResourceHandler.getExternalizedMessage(ResourceConstants.VBF_EXC_INTERNAL_PAGE), exc);
}
}
diff --git a/plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ValidationPropertiesPage.java b/plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ValidationPropertiesPage.java
index 22933ef..cd42473 100644
--- a/plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ValidationPropertiesPage.java
+++ b/plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ValidationPropertiesPage.java
@@ -1177,7 +1177,7 @@
} catch (InvocationTargetException exc) {
_pageImpl = new InvalidPage(parent);
displayAndLogError(ResourceHandler.getExternalizedMessage(ResourceConstants.VBF_EXC_INTERNAL_TITLE), ResourceHandler.getExternalizedMessage(ResourceConstants.VBF_EXC_INTERNAL_PAGE), exc);
- } catch (Throwable exc) {
+ } catch (Exception exc) {
_pageImpl = new InvalidPage(parent);
displayAndLogError(ResourceHandler.getExternalizedMessage(ResourceConstants.VBF_EXC_INTERNAL_TITLE), ResourceHandler.getExternalizedMessage(ResourceConstants.VBF_EXC_INTERNAL_PAGE), exc);
}
@@ -1195,7 +1195,7 @@
super.dispose();
try {
_pageImpl.dispose();
- } catch (Throwable exc) {
+ } catch (Exception exc) {
logError(exc);
}
}
@@ -1236,7 +1236,7 @@
_pageImpl.performDefaults();
} catch (InvocationTargetException exc) {
displayAndLogError(ResourceHandler.getExternalizedMessage(ResourceConstants.VBF_EXC_INTERNAL_TITLE), ResourceHandler.getExternalizedMessage(ResourceConstants.VBF_EXC_INTERNAL_PAGE), exc);
- } catch (Throwable exc) {
+ } catch (Exception exc) {
displayAndLogError(ResourceHandler.getExternalizedMessage(ResourceConstants.VBF_EXC_INTERNAL_TITLE), ResourceHandler.getExternalizedMessage(ResourceConstants.VBF_EXC_INTERNAL_PAGE), exc);
}
}
@@ -1258,7 +1258,7 @@
} catch (InvocationTargetException exc) {
displayAndLogError(ResourceHandler.getExternalizedMessage(ResourceConstants.VBF_EXC_INTERNAL_TITLE), ResourceHandler.getExternalizedMessage(ResourceConstants.VBF_EXC_INTERNAL_PAGE), exc);
return false;
- } catch (Throwable exc) {
+ } catch (Exception exc) {
displayAndLogError(ResourceHandler.getExternalizedMessage(ResourceConstants.VBF_EXC_INTERNAL_TITLE), ResourceHandler.getExternalizedMessage(ResourceConstants.VBF_EXC_INTERNAL_PAGE), exc);
return false;
}
diff --git a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/EventManager.java b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/EventManager.java
index ec6fca6..f8685ed 100644
--- a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/EventManager.java
+++ b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/EventManager.java
@@ -99,7 +99,7 @@
}
continue;
- } catch (Throwable exc) {
+ } catch (Exception exc) {
// If there is a problem with this particular helper, log the error and
// continue
// with the next validator.
@@ -170,7 +170,7 @@
}
continue;
- } catch (Throwable exc) {
+ } catch (Exception exc) {
// If there is a problem with this particular helper, log the error and
// continue
// with the next validator.
@@ -363,7 +363,7 @@
if (helper != null) {
try {
helper.shutdown();
- } catch (Throwable exc) {
+ } catch (Exception exc) {
// Since we're shutting down, ignore the exception.
}
}
@@ -385,7 +385,7 @@
}
}
}
- } catch (Throwable exc) {
+ } catch (Exception exc) {
// Since we're shutting down, ignore the exception.
}
}
diff --git a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/FilterUtil.java b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/FilterUtil.java
index b13cfb7..1f88909 100644
--- a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/FilterUtil.java
+++ b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/FilterUtil.java
@@ -320,7 +320,7 @@
try {
helper.registerResource(resource);
- } catch (Throwable exc) {
+ } catch (Exception exc) {
// How to log this????
Logger logger = ValidationPlugin.getPlugin().getMsgLogger();
if (logger.isLoggingLevel(Level.SEVERE)) {
diff --git a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ReferencialFileValidatorExtension.java b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ReferencialFileValidatorExtension.java
index 506cf47..40574c9 100644
--- a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ReferencialFileValidatorExtension.java
+++ b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ReferencialFileValidatorExtension.java
@@ -49,7 +49,7 @@
try {
if (instance == null && !errorCondition)
instance = (ReferencialFileValidator) element.createExecutableExtension(RUN);
- } catch (Throwable e) {
+ } catch (Exception e) {
Logger.getLogger().logError(e);
errorCondition = true;
}
diff --git a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/TaskListUtility.java b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/TaskListUtility.java
index cdbf991..b0959a1 100644
--- a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/TaskListUtility.java
+++ b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/TaskListUtility.java
@@ -343,7 +343,7 @@
logger.write(Level.SEVERE, entry);
}
continue;
- } catch (Throwable exc) {
+ } catch (Exception exc) {
Logger logger = ValidationPlugin.getPlugin().getMsgLogger();
if (logger.isLoggingLevel(Level.SEVERE)) {
LogEntry entry = ValidationPlugin.getLogEntry();
diff --git a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/VThreadManager.java b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/VThreadManager.java
index 05b3891..5d98dce 100644
--- a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/VThreadManager.java
+++ b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/VThreadManager.java
@@ -63,7 +63,7 @@
job.run();
getJobs().setActive(false);
}
- } catch (Throwable exc) {
+ } catch (Exception exc) {
// This exception is added as FINE instead of SEVERE because it's not
// improbable
// that an exception will be thrown
diff --git a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidationConfiguration.java b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidationConfiguration.java
index 726dd9f..c0495fc 100644
--- a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidationConfiguration.java
+++ b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidationConfiguration.java
@@ -674,7 +674,7 @@
}
} catch (InvocationTargetException exc) {
throw exc;
- } catch (Throwable exc) {
+ } catch (Exception exc) {
String resourceName = (getResource() == null) ? "null" : getResource().getName(); //$NON-NLS-1$
throw new InvocationTargetException(exc, ResourceHandler.getExternalizedMessage(ResourceConstants.VBF_EXC_RETRIEVE, new String[]{resourceName}));
}
diff --git a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidationRegistryReader.java b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidationRegistryReader.java
index ad7c0cb..1b4239e 100644
--- a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidationRegistryReader.java
+++ b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidationRegistryReader.java
@@ -110,7 +110,7 @@
// Once all of the validators have been read, the caches of the
// validators need to be updated.
buildCache();
- } catch (Throwable exc) {
+ } catch (Exception exc) {
Logger logger = ValidationPlugin.getPlugin().getMsgLogger();
if (logger.isLoggingLevel(Level.SEVERE)) {
LogEntry entry = ValidationPlugin.getLogEntry();
@@ -500,7 +500,7 @@
IWorkbenchContext wh = null;
try {
wh = (IWorkbenchContext) element.createExecutableExtension(TAG_HELPER_CLASS);
- } catch (Throwable exc) {
+ } catch (Exception exc) {
Logger logger = ValidationPlugin.getPlugin().getMsgLogger();
if (logger.isLoggingLevel(Level.SEVERE)) {
LogEntry entry = ValidationPlugin.getLogEntry();
@@ -521,7 +521,7 @@
IValidator validator = null;
try {
validator = (IValidator) element.createExecutableExtension(TAG_RUN_CLASS);
- } catch (Throwable exc) {
+ } catch (Exception exc) {
Logger logger = ValidationPlugin.getPlugin().getMsgLogger();
if (logger.isLoggingLevel(Level.SEVERE)) {
LogEntry entry = ValidationPlugin.getLogEntry();
diff --git a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidationBuilder.java b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidationBuilder.java
index 80c7d76..045f514 100644
--- a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidationBuilder.java
+++ b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidationBuilder.java
@@ -207,7 +207,7 @@
logInvocationTargetException(logger, exc);
executionMap |= 0x20;
return referenced;
- } catch (Throwable exc) {
+ } catch (Exception exc) {
logBuildError(logger, exc);
executionMap |= 0x40;
return referenced;
diff --git a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidationOperation.java b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidationOperation.java
index b409c79..a205190 100644
--- a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidationOperation.java
+++ b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidationOperation.java
@@ -1102,7 +1102,7 @@
} catch (OperationCanceledException exc) {
// This is handled in the validate(WorkbenchReporter) method.
throw exc;
- }catch (Throwable exc) {
+ }catch (Exception exc) {
// If there is a problem with this particular validator, log the
// error and continue
// with the next validator.
@@ -1204,7 +1204,7 @@
}
} catch (OperationCanceledException exc) {
throw exc;
- } catch (Throwable exc) {
+ } catch (Exception exc) {
// If there is a problem with this particular validator, log the
// error and continue
// with the next validator.
@@ -1374,7 +1374,7 @@
if (exc.getAssociatedMessage() != null) {
reporter.addMessage(validator, exc.getAssociatedMessage());
}
- } catch (Throwable exc) {
+ } catch (Exception exc) {
// If there is a problem with this particular validator, log the
// error and continue
// with the next validator.
@@ -1412,7 +1412,7 @@
throw e;
} catch (OperationCanceledException e) {
throw e;
- } catch (Throwable exc) {
+ } catch (Exception exc) {
// If a runtime exception has occured, e.g. NullPointer or
// ClassCast, display it with the "A runtime exception has
// occurred " messsage.
@@ -1449,7 +1449,7 @@
throw e;
} catch (OperationCanceledException e) {
throw e;
- } catch (Throwable exc) {
+ } catch (Exception exc) {
// If a runtime exception has occured, e.g. NullPointer or
// ClassCast, display it with the "A runtime exception has
// occurred " messsage.
diff --git a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidatorJob.java b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidatorJob.java
index 452a9bb..80d9602 100644
--- a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidatorJob.java
+++ b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidatorJob.java
@@ -110,7 +110,7 @@
if (exc.getAssociatedMessage() != null) {
reporter.addMessage(validator, exc.getAssociatedMessage());
}
- } catch (Throwable exc) {
+ } catch (Exception exc) {
if (logger.isLoggingLevel(Level.SEVERE)) {
LogEntry entry = ValidationPlugin.getLogEntry();
entry.setSourceID("ValidatorJob.run()"); //$NON-NLS-1$
@@ -132,7 +132,7 @@
validator.cleanup(reporter);
} catch (OperationCanceledException e) {
throw e;
- } catch (Throwable exc) {
+ } catch (Exception exc) {
if (logger.isLoggingLevel(Level.SEVERE)) {
LogEntry entry = ValidationPlugin.getLogEntry();
entry.setSourceID("ValidatorJob.run()"); //$NON-NLS-1$
@@ -153,7 +153,7 @@
vmd.removeHelper( validator );
}catch (OperationCanceledException e) {
throw e;
- } catch (Throwable exc) {
+ } catch (Exception exc) {
if (logger.isLoggingLevel(Level.SEVERE)) {
LogEntry entry = ValidationPlugin.getLogEntry();
entry.setSourceID("ValidatorJob.run()"); //$NON-NLS-1$
diff --git a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/WorkbenchContext.java b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/WorkbenchContext.java
index 37c69e3..4cbc586 100644
--- a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/WorkbenchContext.java
+++ b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/WorkbenchContext.java
@@ -290,7 +290,7 @@
}
try {
return util.getLineNo(object);
- } catch (Throwable exc) {
+ } catch (Exception exc) {
Logger logger = ValidationPlugin.getPlugin().getMsgLogger();
if (logger.isLoggingLevel(Level.SEVERE)) {
LogEntry entry = ValidationPlugin.getLogEntry();
diff --git a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/WorkbenchReporter.java b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/WorkbenchReporter.java
index 6d857bf..b6fca7f 100644
--- a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/WorkbenchReporter.java
+++ b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/WorkbenchReporter.java
@@ -289,7 +289,7 @@
String location = null;
try {
location = helper.getLocation(targetObject);
- } catch (Throwable exc) {
+ } catch (Exception exc) {
Logger logger = ValidationPlugin.getPlugin().getMsgLogger();
if (logger.isLoggingLevel(Level.SEVERE)) {
LogEntry entry = ValidationPlugin.getLogEntry();
@@ -317,7 +317,7 @@
String targetObjectName = null;
try {
targetObjectName = helper.getTargetObjectName(targetObject);
- } catch (Throwable exc) {
+ } catch (Exception exc) {
Logger logger = ValidationPlugin.getPlugin().getMsgLogger();
if (logger.isLoggingLevel(Level.SEVERE)) {
LogEntry entry = ValidationPlugin.getLogEntry();
@@ -456,7 +456,7 @@
entry.setTargetException(exc);
logger.write(Level.SEVERE, entry);
}
- } catch (Throwable exc) {
+ } catch (Exception exc) {
Logger logger = ValidationPlugin.getPlugin().getMsgLogger();
if (logger.isLoggingLevel(Level.SEVERE)) {
LogEntry entry = ValidationPlugin.getLogEntry();