Mercurial > projects > dwt-win
changeset 57:41dbc4d9faab
Update to tango trunk -r3152. Thanks DavidLeon for the adjustment of TracedException to Exception and creating the patch.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 04 Feb 2008 12:46:24 +0100 |
parents | dcb2e04003ac |
children | 0aa35c03aced |
files | dwt/DWT.d dwt/DWTError.d dwt/DWTException.d dwt/dwthelper/utils.d dwt/graphics/Device.d dwt/graphics/DeviceData.d dwt/internal/image/FileFormat.d dwt/internal/image/GIFFileFormat.d dwt/internal/image/JPEGDecoder.d dwt/internal/image/JPEGFileFormat.d dwt/internal/image/JPEGFixedSizeSegment.d dwt/internal/image/JPEGSegment.d dwt/internal/image/JPEGVariableSizeSegment.d dwt/internal/image/LZWCodec.d dwt/internal/image/OS2BMPFileFormat.d dwt/internal/image/TIFFFileFormat.d dwt/internal/image/WinBMPFileFormat.d dwt/widgets/RunnableLock.d dwt/widgets/Synchronizer.d |
diffstat | 19 files changed, 38 insertions(+), 38 deletions(-) [+] |
line wrap: on
line diff
--- a/dwt/DWT.d Mon Feb 04 12:34:19 2008 +0100 +++ b/dwt/DWT.d Mon Feb 04 12:46:24 2008 +0100 @@ -3487,7 +3487,7 @@ * @see DWTException * @see IllegalArgumentException */ -public static void error (int code, TracedException throwable) { +public static void error (int code, Exception throwable) { error (code, throwable, null); } @@ -3519,7 +3519,7 @@ * * @since 3.0 */ -public static void error (int code, TracedException throwable, char[] detail) { +public static void error (int code, Exception throwable, char[] detail) { /* * This code prevents the creation of "chains" of SWTErrors and
--- a/dwt/DWTError.d Mon Feb 04 12:34:19 2008 +0100 +++ b/dwt/DWTError.d Mon Feb 04 12:46:24 2008 +0100 @@ -54,7 +54,7 @@ * The underlying throwable that caused the problem, * or null if this information is not available. */ - public TracedException throwable; + public Exception throwable; //static final long serialVersionUID = 3833467327105808433L;
--- a/dwt/DWTException.d Mon Feb 04 12:34:19 2008 +0100 +++ b/dwt/DWTException.d Mon Feb 04 12:46:24 2008 +0100 @@ -34,7 +34,7 @@ * @see DWTError */ -public class DWTException : TracedException { +public class DWTException : Exception { /** * The DWT error code, one of DWT.ERROR_*. @@ -45,7 +45,7 @@ * The underlying throwable that caused the problem, * or null if this information is not available. */ - public TracedException throwable; + public Exception throwable; //static final long serialVersionUID = 3257282552304842547L; @@ -106,7 +106,7 @@ * * @since 3.1 */ -public TracedException getCause() { +public Exception getCause() { return throwable; }
--- a/dwt/dwthelper/utils.d Mon Feb 04 12:34:19 2008 +0100 +++ b/dwt/dwthelper/utils.d Mon Feb 04 12:46:24 2008 +0100 @@ -135,7 +135,7 @@ this( char[] e ){ super(e); } - this( TracedException e ){ + this( Exception e ){ super(e.toString); } }
--- a/dwt/graphics/Device.d Mon Feb 04 12:34:19 2008 +0100 +++ b/dwt/graphics/Device.d Mon Feb 04 12:46:24 2008 +0100 @@ -63,7 +63,7 @@ public static bool DEBUG; bool debug_; bool tracking; - TracedException [] errors; + Exception [] errors; Object [] objects; /** @@ -160,7 +160,7 @@ create (data); init (); if (tracking) { - errors = new TracedException [128]; + errors = new Exception [128]; objects = new Object [128]; } @@ -204,7 +204,7 @@ if (Gdip.GdiplusStartup ( &token, &input, null ) is 0) { gdipToken = token; } - } catch (TracedException t) { + } catch (Exception t) { DWT.error (DWT.ERROR_NO_GRAPHICS_LIBRARY, t, " [GDI+ is required]"); //$NON-NLS-1$ } finally { OS.SetErrorMode (oldErrorMode); @@ -392,7 +392,7 @@ } int index = 0; data.objects = new Object [count]; - data.errors = new TracedException [count]; + data.errors = new Exception [count]; for (int i=0; i<length; i++) { if (objects [i] !is null) { data.objects [index] = objects [i]; @@ -820,7 +820,7 @@ for (int i=0; i<objects.length; i++) { if (objects [i] is null) { objects [i] = object; - errors [i] = new TracedException ( "" ); + errors [i] = new Exception ( "" ); return; } } @@ -828,9 +828,9 @@ System.arraycopy (objects, 0, newObjects, 0, objects.length); newObjects [objects.length] = object; objects = newObjects; - TracedException [] newErrors = new TracedException [errors.length + 128]; + Exception [] newErrors = new Exception [errors.length + 128]; System.arraycopy (errors, 0, newErrors, 0, errors.length); - newErrors [errors.length] = new TracedException (""); + newErrors [errors.length] = new Exception (""); errors = newErrors; }
--- a/dwt/graphics/DeviceData.d Mon Feb 04 12:34:19 2008 +0100 +++ b/dwt/graphics/DeviceData.d Mon Feb 04 12:46:24 2008 +0100 @@ -21,6 +21,6 @@ */ public bool debug_; public bool tracking; - public TracedException [] errors; + public Exception [] errors; public Object [] objects; }
--- a/dwt/internal/image/FileFormat.d Mon Feb 04 12:34:19 2008 +0100 +++ b/dwt/internal/image/FileFormat.d Mon Feb 04 12:46:24 2008 +0100 @@ -67,7 +67,7 @@ } catch (IOException e) { DWT.error(DWT.ERROR_IO, e); return null; - } catch (TracedException e) { + } catch (Exception e) { DWT.error(DWT.ERROR_INVALID_IMAGE, e); return null; } @@ -88,7 +88,7 @@ isSupported = true; break; } - } catch (TracedException e) { + } catch (Exception e) { } } if (!isSupported) DWT.error(DWT.ERROR_UNSUPPORTED_FORMAT); @@ -113,7 +113,7 @@ fileFormat = new TFormat(); } } - } catch (TracedException e) { + } catch (Exception e) { DWT.error(DWT.ERROR_UNSUPPORTED_FORMAT); } if (format is DWT.IMAGE_BMP_RLE) { @@ -137,7 +137,7 @@ outputStream = stream; unloadIntoByteStream(loader); outputStream.flush(); - } catch (TracedException e) { + } catch (Exception e) { try {outputStream.flush();} catch (Exception f) {} DWT.error(DWT.ERROR_IO, e); }
--- a/dwt/internal/image/GIFFileFormat.d Mon Feb 04 12:34:19 2008 +0100 +++ b/dwt/internal/image/GIFFileFormat.d Mon Feb 04 12:46:24 2008 +0100 @@ -231,7 +231,7 @@ size = inputStream.read(); } return comment; - } catch (TracedException e) { + } catch (Exception e) { DWT.error(DWT.ERROR_IO, e); return null; } @@ -262,7 +262,7 @@ size = inputStream.read(); } return text; - } catch (TracedException e) { + } catch (Exception e) { DWT.error(DWT.ERROR_IO, e); return null; } @@ -296,7 +296,7 @@ // Read block terminator. inputStream.read(); return controlBlock; - } catch (TracedException e) { + } catch (Exception e) { DWT.error(DWT.ERROR_IO, e); return null; } @@ -337,7 +337,7 @@ loader.repeatCount = repeatCount; } return data; - } catch (TracedException e) { + } catch (Exception e) { DWT.error(DWT.ERROR_IO, e); return null; }
--- a/dwt/internal/image/JPEGDecoder.d Mon Feb 04 12:34:19 2008 +0100 +++ b/dwt/internal/image/JPEGDecoder.d Mon Feb 04 12:46:24 2008 +0100 @@ -6333,7 +6333,7 @@ stream.read(buffer); stream.unread(buffer); return (buffer[0] & 0xFF) is 0xFF && (buffer[1] & 0xFF) is M_SOI; - } catch (TracedException e) { + } catch (Exception e) { return false; } }
--- a/dwt/internal/image/JPEGFileFormat.d Mon Feb 04 12:34:19 2008 +0100 +++ b/dwt/internal/image/JPEGFileFormat.d Mon Feb 04 12:46:24 2008 +0100 @@ -1375,7 +1375,7 @@ JPEGStartOfImage soi = new JPEGStartOfImage(stream); stream.unread(soi.reference); return soi.verify(); // we no longer check for appN - } catch (TracedException e) { + } catch (Exception e) { return false; } } @@ -1748,7 +1748,7 @@ } int delta = jpegSegment.getSegmentLength() - 2; byteStream.skip(delta); - } catch (TracedException e) { + } catch (Exception e) { DWT.error(DWT.ERROR_IO, e); } }
--- a/dwt/internal/image/JPEGFixedSizeSegment.d Mon Feb 04 12:34:19 2008 +0100 +++ b/dwt/internal/image/JPEGFixedSizeSegment.d Mon Feb 04 12:46:24 2008 +0100 @@ -35,7 +35,7 @@ reference = new byte[fixedSize()]; try { byteStream.read(reference); - } catch (TracedException e) { + } catch (Exception e) { DWT.error(DWT.ERROR_IO, e); } }
--- a/dwt/internal/image/JPEGSegment.d Mon Feb 04 12:34:19 2008 +0100 +++ b/dwt/internal/image/JPEGSegment.d Mon Feb 04 12:46:24 2008 +0100 @@ -56,7 +56,7 @@ try { byteStream.write(reference); return true; - } catch (TracedException e) { + } catch (Exception e) { return false; } }
--- a/dwt/internal/image/JPEGVariableSizeSegment.d Mon Feb 04 12:34:19 2008 +0100 +++ b/dwt/internal/image/JPEGVariableSizeSegment.d Mon Feb 04 12:46:24 2008 +0100 @@ -36,7 +36,7 @@ contents[3] = header[3]; byteStream.read(contents, 4, contents.length - 4); reference = contents; - } catch (TracedException e) { + } catch (Exception e) { DWT.error(DWT.ERROR_IO, e); } }
--- a/dwt/internal/image/LZWCodec.d Mon Feb 04 12:34:19 2008 +0100 +++ b/dwt/internal/image/LZWCodec.d Mon Feb 04 12:46:24 2008 +0100 @@ -468,7 +468,7 @@ if (size is -1) { DWT.error(DWT.ERROR_INVALID_IMAGE); } - } catch (TracedException e) { + } catch (Exception e) { DWT.error(DWT.ERROR_IO, e); } return size; @@ -480,7 +480,7 @@ void writeBlock() { try { outputStream.write(block, 0, (block[0] & 0xFF) + 1); - } catch (TracedException e) { + } catch (Exception e) { DWT.error(DWT.ERROR_IO, e); } }
--- a/dwt/internal/image/OS2BMPFileFormat.d Mon Feb 04 12:34:19 2008 +0100 +++ b/dwt/internal/image/OS2BMPFileFormat.d Mon Feb 04 12:46:24 2008 +0100 @@ -36,7 +36,7 @@ stream.unread(header); int infoHeaderSize = (header[14] & 0xFF) | ((header[15] & 0xFF) << 8) | ((header[16] & 0xFF) << 16) | ((header[17] & 0xFF) << 24); return header[0] is 0x42 && header[1] is 0x4D && infoHeaderSize is BMPHeaderFixedSize; - } catch (TracedException e) { + } catch (Exception e) { return false; } } @@ -78,7 +78,7 @@ byte[] infoHeader = new byte[BMPHeaderFixedSize]; try { inputStream.read(infoHeader); - } catch (TracedException e) { + } catch (Exception e) { DWT.error(DWT.ERROR_IO, e); } width = (infoHeader[4] & 0xFF) | ((infoHeader[5] & 0xFF) << 8);
--- a/dwt/internal/image/TIFFFileFormat.d Mon Feb 04 12:34:19 2008 +0100 +++ b/dwt/internal/image/TIFFFileFormat.d Mon Feb 04 12:46:24 2008 +0100 @@ -38,7 +38,7 @@ return false; } return true; - } catch (TracedException e) { + } catch (Exception e) { return false; } }
--- a/dwt/internal/image/WinBMPFileFormat.d Mon Feb 04 12:34:19 2008 +0100 +++ b/dwt/internal/image/WinBMPFileFormat.d Mon Feb 04 12:46:24 2008 +0100 @@ -339,7 +339,7 @@ stream.unread(header); int infoHeaderSize = (header[14] & 0xFF) | ((header[15] & 0xFF) << 8) | ((header[16] & 0xFF) << 16) | ((header[17] & 0xFF) << 24); return header[0] is 0x42 && header[1] is 0x4D && infoHeaderSize >= BMPHeaderFixedSize; - } catch (TracedException e) { + } catch (Exception e) { return false; } } @@ -399,7 +399,7 @@ byte[] infoHeader = new byte[BMPHeaderFixedSize]; try { inputStream.read(infoHeader); - } catch (TracedException e) { + } catch (Exception e) { DWT.error(DWT.ERROR_IO, e); } int width = (infoHeader[4] & 0xFF) | ((infoHeader[5] & 0xFF) << 8) | ((infoHeader[6] & 0xFF) << 16) | ((infoHeader[7] & 0xFF) << 24);
--- a/dwt/widgets/RunnableLock.d Mon Feb 04 12:34:19 2008 +0100 +++ b/dwt/widgets/RunnableLock.d Mon Feb 04 12:46:24 2008 +0100 @@ -26,7 +26,7 @@ class RunnableLock { Runnable runnable; Thread thread; - TracedException throwable; + Exception throwable; this (Runnable runnable) { this.runnable = runnable;
--- a/dwt/widgets/Synchronizer.d Mon Feb 04 12:34:19 2008 +0100 +++ b/dwt/widgets/Synchronizer.d Mon Feb 04 12:46:24 2008 +0100 @@ -130,7 +130,7 @@ syncThread = lock.thread; try { lock.run (); - } catch (TracedException t) { + } catch (Exception t) { lock.throwable = t; DWT.error (DWT.ERROR_FAILED_EXEC, t); } finally {