Problem with writeln

Steven Schveighoffer schveiguy at yahoo.com
Mon Mar 1 03:47:01 PST 2010


On Mon, 01 Mar 2010 04:11:28 -0500, Ivan <ivan.senji at gmail.com> wrote:

> The part of code in my main method is this:
>
> 	try {
> 		writefln("Starting main loop...");
> 		global.loop.start();
> 		writefln("Main loop finished...");
> 	} catch(Exception e) {
> 		writefln("Exception was: %s", e.msg);
> 	}
>
>  From what I can see an exception was thrown ("unable to write to  
> stream") and the only line I added to the loop is this:
>
> 	writefln(". %s", counter++);
>
> If that line is removed, an exception seams to be thrown from the line
> 	writefln("Main loop finished...");

Post more code.  I suspect you are messing up something.  It appears that  
you may be closing stdout, but I can't be sure because your code is not  
complete.

-Steve



More information about the Digitalmars-d mailing list