view tangotests/q.d @ 143:336ec4f4bbb3 trunk

[svn r147] tango.io.Console is now working. True this time :) Yay!
author lindquist
date Fri, 25 Jan 2008 01:42:36 +0100
parents 0dec7b3727ea
children
line wrap: on
line source

class E : Exception
{
    this(char[] msg)
    {
        super(msg);
    }

    char[] toString()
    {
        return super.toString();
    }
}

extern(C) int printf(char*, ...);

void main()
{
    auto e = new E("hello world");
    auto msg = e.toString();
    printf("message should be: '%.*s'\n", msg.length, msg.ptr);
    throw e;
}