Changeset 206:cca980503056

Show
Ignore:
Timestamp:
04/16/08 14:36:50 (6 months ago)
Author:
Frank Benoit <benoit@tionex.de>
branch:
default
Message:

sync with dwt-linux, removed the simple.d

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dwt/DWTError.d

    r59 r206  
    4545 
    4646public class DWTError : PlatformException { 
    47  
    4847    /** 
    4948     * The DWT error code, one of DWT.ERROR_*. 
     
    5554     * or null if this information is not available. 
    5655     */ 
    57     public Exception throwable; 
     56    public Exception throwable( Exception e ){ 
     57        this.next = e; 
     58        return this.next; 
     59    } 
     60    public Exception throwable(){ 
     61        return this.next; 
     62    } 
    5863 
    5964    //static final long serialVersionUID = 3833467327105808433L; 
     
    130135public char[] getMessage () { 
    131136    if (throwable is null) 
    132         return super.toString (); 
     137        return super.toString(); 
    133138    return super.toString () ~ " (" ~ throwable.toString () ~ ")"; //$NON-NLS-1$ //$NON-NLS-2$ 
    134139} 
     
    153158        } 
    154159    } 
     160} 
    155161 
    156162} 
    157 } 
    158  
    159  
    160  
  • dwt/DWTException.d

    r59 r206  
    3636 
    3737public class DWTException : Exception { 
    38  
    3938    /** 
    4039     * The DWT error code, one of DWT.ERROR_*. 
     
    4645     * or null if this information is not available. 
    4746     */ 
    48     public Exception throwable; 
     47    public Exception throwable( Exception e ){ 
     48        this.next = e; 
     49        return this.next; 
     50    } 
     51    public Exception throwable(){ 
     52        return this.next; 
     53    } 
     54 
    4955 
    5056    //static final long serialVersionUID = 3257282552304842547L; 
     
    120126 */ 
    121127public char[] getMessage () { 
    122     if (throwable is null) 
    123         return super.toString (); 
     128    if (throwable is null) return super.toString (); 
    124129    return super.toString () ~ " (" ~ throwable.toString () ~ ")"; //$NON-NLS-1$ //$NON-NLS-2$ 
    125130} 
     
    148153} 
    149154 
     155 
  • dwt/dwthelper/Runnable.d

    r0 r206  
    33 */ 
    44module dwt.dwthelper.Runnable; 
     5 
     6 
     7import tango.core.Tuple; 
     8import tango.core.Traits; 
    59 
    610public interface Runnable  { 
     
    1014} 
    1115 
     16class _DgRunnableT(Dg,T...) : Runnable { 
    1217 
     18    alias ParameterTupleOf!(Dg) DgArgs; 
     19    static assert( is(DgArgs == Tuple!(T)), 
     20                "Delegate args not correct" ); 
     21 
     22    Dg dg; 
     23    T t; 
     24 
     25    private this( Dg dg, T t ){ 
     26        this.dg = dg; 
     27        static if( T.length > 0 ){ 
     28            this.t = t; 
     29        } 
     30    } 
     31 
     32    void run( ){ 
     33        dg(t); 
     34    } 
     35} 
     36 
     37_DgRunnableT!(Dg,T) dgRunnable(Dg,T...)( Dg dg, T args ){ 
     38    return new _DgRunnableT!(Dg,T)(dg,args); 
     39} 
  • dwt/dwthelper/utils.d

    r202 r206  
    778778} 
    779779void ExceptionPrintStackTrace( Exception e, Print!(char) print ){ 
    780     print.formatln( "Exception in {}({}): {}", e.file, e.line, e.msg ); 
     780    Exception exception = e; 
     781    while( exception !is null ){ 
     782        print.formatln( "Exception in {}({}): {}", exception.file, exception.line, exception.msg ); 
     783        foreach( msg; exception.info ){ 
     784            print.formatln( "trc {}", msg ); 
     785        } 
     786        exception = exception.next; 
     787    } 
    781788} 
    782789