Error Message useless

Mike vertex at gmx.at
Sat May 10 01:38:51 PDT 2008


On Sat, 10 May 2008 08:12:25 +0200, Nick Sabalausky <a at a.a> wrote:

> Then do this:
>
> void main()
> {
> Stdout("1").newline;
>    someFunc();
> Stdout("2").newline;
>    if(something)
>    {
> Stdout("3").newline;
>        doSomething();
> Stdout("4").newline;
>    }
> Stdout("5").newline;
>    anotherFunc();
> Stdout("6").newline;
>    yetAnotherFunc();
> Stdout("7").newline;
> }

Oh ... how many time have I wished there was an IDE command to do that :)
I do this all the time and I've always wondered if other people do that  
too ... I call it "laying traps" and I found usually it's best to first  
put not too many Stdouts in there, e.g. one every 4-5 statements if you're  
not really sure where the error happens. Then you can go in and put some  
"3a" "3b" and so on to find the exact statement that causes the problem.

That's, btw, a good reason to put single-line-if/elses into {}s instead of  
writing them on the same line. Easier to put Stdouts in if you need them.

-Mike

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/



More information about the Digitalmars-d mailing list