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

Changeset 1707

Show
Ignore:
Timestamp:
07/01/10 19:07:19 (14 years ago)
Author:
kyllingstad
Message:

Make ErrnoException? put the file name and line number in the right place too.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/phobos/std/contracts.d

    r1706 r1707  
    464464        errno = getErrno; 
    465465        version (linux) 
    466466        { 
    467467            char[1024] buf = void; 
    468468            auto s = std.c.string.strerror_r(errno, buf.ptr, buf.length); 
    469469        } 
    470470        else 
    471471        { 
    472472            auto s = std.c.string.strerror(errno); 
    473473        } 
    474         super((file ? file~'('~to!string(line)~"): " : "") 
    475                 ~msg~" ("~to!string(s)~")"); 
     474        super(msg~" ("~to!string(s)~")", file, line); 
    476475    } 
    477476} 
    478477 
    479478// structuralCast 
    480479// class-to-class structural cast 
    481480Target structuralCast(Target, Source)(Source obj) 
    482481    if (is(Source == class) || is(Target == class)) 
    483482{ 
    484483    // For the structural cast to work, the source and the target must 
    485484    // have the same base class, and the target must add no data or