Error Message useless

Jason House jason.james.house at gmail.com
Sat May 10 06:24:25 PDT 2008


Tower  Ty wrote:

> tango.core.Exception.IllegalArgumentException: Argument not valid
> 
> This message from the compiler is just bloody useless
> Where do you go in a 200 line program?
> 
> All I can see is go to each line that might be a cause and comment it out
> ,try to compile it again and if no good do the next one .
> 
> Some lines just can't be done anyway .
> 
> How hard could it be for you experts to add some detail to the error huh
> ??

Do a try catch at global scope and use the member variables of the exception
to print out extra detail.  Tango exceptions include file and line number
as member data.  Maybe someone should submit a ticket for them to add that
info to the default toString method.



More information about the Digitalmars-d mailing list