Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarolyn MacLeod2004-03-25 22:27:09 +0000
committerCarolyn MacLeod2004-03-25 22:27:09 +0000
commit751399cd435ff7ae4f611108a25dd9577f78e768 (patch)
tree0499eb42a99e40d66d2f198475afe6ba87f67784 /examples
parentc6fd4be6320b2facfb9f1ed9f239ccc09008db10 (diff)
downloadeclipse.platform.swt-751399cd435ff7ae4f611108a25dd9577f78e768.tar.gz
eclipse.platform.swt-751399cd435ff7ae4f611108a25dd9577f78e768.tar.xz
eclipse.platform.swt-751399cd435ff7ae4f611108a25dd9577f78e768.zip
fix for 53274
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/imageanalyzer/ImageAnalyzer.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/imageanalyzer/ImageAnalyzer.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/imageanalyzer/ImageAnalyzer.java
index dbb1c6129b..42e8554100 100755
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/imageanalyzer/ImageAnalyzer.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/imageanalyzer/ImageAnalyzer.java
@@ -830,6 +830,8 @@ public class ImageAnalyzer {
}
} catch (SWTException e) {
showErrorDialog(bundle.getString("Loading_lc"), filename, e);
+ } catch (SWTError e) {
+ showErrorDialog(bundle.getString("Loading_lc"), filename, e);
} finally {
shell.setCursor(null);
imageCanvas.setCursor(crossCursor);
@@ -966,6 +968,8 @@ public class ImageAnalyzer {
} catch (SWTException e) {
showErrorDialog(bundle.getString("Saving_lc"), fileName, e);
+ } catch (SWTError e) {
+ showErrorDialog(bundle.getString("Saving_lc"), fileName, e);
} finally {
shell.setCursor(null);
imageCanvas.setCursor(crossCursor);
@@ -1030,6 +1034,8 @@ public class ImageAnalyzer {
} catch (SWTException e) {
showErrorDialog(bundle.getString("Saving_lc"), filename, e);
+ } catch (SWTError e) {
+ showErrorDialog(bundle.getString("Saving_lc"), filename, e);
} finally {
shell.setCursor(null);
imageCanvas.setCursor(crossCursor);
@@ -1083,6 +1089,8 @@ public class ImageAnalyzer {
} catch (SWTException e) {
showErrorDialog(bundle.getString("Saving_lc"), filename, e);
+ } catch (SWTError e) {
+ showErrorDialog(bundle.getString("Saving_lc"), filename, e);
} finally {
shell.setCursor(null);
imageCanvas.setCursor(crossCursor);
@@ -1921,7 +1929,7 @@ public class ImageAnalyzer {
/*
* Open an error dialog displaying the specified information.
*/
- void showErrorDialog(String operation, String filename, Exception e) {
+ void showErrorDialog(String operation, String filename, Throwable e) {
MessageBox box = new MessageBox(shell, SWT.ICON_ERROR);
String message = createMsg(bundle.getString("Error"), new String[] {operation, filename});
String errorMessage = "";
@@ -1932,6 +1940,12 @@ public class ImageAnalyzer {
if (swte.throwable != null) {
errorMessage += ":\n" + swte.throwable.toString();
}
+ } else if (e instanceof SWTError) {
+ SWTError swte = (SWTError) e;
+ errorMessage = swte.getMessage();
+ if (swte.throwable != null) {
+ errorMessage += ":\n" + swte.throwable.toString();
+ }
} else {
errorMessage = e.toString();
}

Back to the top