Changeset 399

Show
Ignore:
Timestamp:
07/21/08 11:04:43 (4 months ago)
Author:
FeepingCreature
Message:
  • Forgot another error handling bit
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/tools/tools/threads.d

    r398 r399  
    8484      private static void check(string s, int i) { if (i) throw new Exception(Format(s, " failed : ", i, "!")); } 
    8585      void set(Ref r) { 
    86         check("set:TlsSetValue", TlsSetValue(key, cast(void*) r)); 
     86        if (!TlsSetValue(key, cast(void*) r)) throw new Exception("set:TlsSetValue failed!"); 
    8787      } 
    8888      Ref check() { return cast(Ref) cast(void*) TlsGetValue(key); } 
     
    9292          res = maker(); 
    9393          synchronized(this) values ~= res; 
    94           if (!TlsSetValue(key, cast(void*) res)) throw new Exception("ptr:TlsSetValue failed"); 
     94          if (!TlsSetValue(key, cast(void*) res)) throw new Exception("ptr:TlsSetValue failed!"); 
    9595        } 
    9696        return res;