Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.

Changeset 508

Show
Ignore:
Timestamp:
01/14/11 10:52:15 (14 years ago)
Author:
Don Clugston
Message:

No longer need to catch non-Throwables.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/core/thread.d

    r496 r508  
    192192            { 
    193193                rt_moduleTlsCtor(); 
    194194                try 
    195195                { 
    196196                    obj.run(); 
    197197                } 
    198198                catch( Throwable t ) 
    199199                { 
    200200                    append( t ); 
    201201                } 
    202                 catch( Object o ) 
    203                 { 
    204                     // TODO: Remove this once the compiler prevents it. 
    205                 } 
    206202                rt_moduleTlsDtor(); 
    207203            } 
    208204            catch( Throwable t ) 
    209205            { 
    210206                append( t ); 
    211             } 
    212             catch( Object o ) 
    213             { 
    214                 // TODO: Remove this once the compiler prevents it. 
    215207            } 
    216208            return 0; 
    217209        } 
    218210 
    219211 
    220212        HANDLE GetCurrentThreadHandle() 
    221213        { 
    222214            const uint DUPLICATE_SAME_ACCESS = 0x00000002; 
    223215 
    224216            HANDLE curr = GetCurrentThread(), 
     
    28532845        obj.m_ctxt.tstack = obj.m_ctxt.bstack; 
    28542846        obj.m_state = Fiber.State.EXEC; 
    28552847 
    28562848        try 
    28572849        { 
    28582850            obj.run(); 
    28592851        } 
    28602852        catch( Throwable t ) 
    28612853        { 
    28622854            obj.m_unhandled = t; 
    2863         } 
    2864         catch( Object o ) 
    2865         { 
    2866             // TODO: Remove this once the compiler prevents it. 
    28672855        } 
    28682856 
    28692857        static if( __traits( compiles, ucontext_t ) ) 
    28702858          obj.m_ucur = &obj.m_utxt; 
    28712859 
    28722860        obj.m_state = Fiber.State.TERM; 
    28732861        obj.switchOut(); 
    28742862    } 
    28752863 
    28762864 
  • trunk/src/rt/dmain2.d

    r507 r508  
    435435                            console (t)("\n"); 
    436436                    } 
    437437                    if (e.next) 
    438438                        console ("\n"); 
    439439                    e = e.next; 
    440440                } 
    441441                +/ 
    442442                console (e.toString)("\n"); 
    443443                result = EXIT_FAILURE; 
    444444            } 
    445             catch (Object o) 
    446             { 
    447                 // fprintf(stderr, "%.*s\n", o.toString()); 
    448                 console (o.toString)("\n"); 
    449                 result = EXIT_FAILURE; 
    450             } 
    451445        } 
    452446        else 
    453447        { 
    454448            dg(); 
    455449        } 
    456450    } 
    457451 
    458452    // NOTE: The lifetime of a process is much like the lifetime of an object: 
    459453    //       it is initialized, then used, then destroyed.  If initialization 
    460454    //       fails, the successive two steps are never reached.  However, if 
  • trunk/src/rt/util/utf.d

    r441 r508  
    328328    ]; 
    329329 
    330330    for (int j = 0; j < s4.length; j++) 
    331331    { 
    332332    try 
    333333    { 
    334334        i = 0; 
    335335        c = decode(s4[j], i); 
    336336        assert(0); 
    337337    } 
    338     catch (Object o) 
     338    catch (Throwable o) 
    339339    { 
    340340        i = 23; 
    341341    } 
    342342    assert(i == 23); 
    343343    } 
    344344} 
    345345 
    346346/** ditto */ 
    347347 
    348348dchar decode(in wchar[] s, ref size_t idx)