digitalmars.D - Error Message useless
- Tower Ty (6/6) May 09 2008 tango.core.Exception.IllegalArgumentException: Argument not valid
- Jarrett Billingsley (4/12) May 09 2008 Is this a *compiler* error? Are you *sure*?
- Tower Ty (2/22) May 09 2008 No of course it is a run time error and I'm still looking for it , Jarre...
- Nick Sabalausky (47/72) May 09 2008 Yea, that's kind of a problem with getting uncaught exceptions in the
- Ty Tower (2/87) May 10 2008 Thanks
- Mike (12/30) May 10 2008 Oh ... how many time have I wished there was an IDE command to do that :...
- Nick Sabalausky (15/43) May 10 2008 You've just made me feel incredibly stupid. That particular "Why in the
- Mike (15/28) May 11 2008 Yeah, I hate it when Eclipse starts to put my case statements on the wro...
- Tower Ty (3/39) May 11 2008 If you are proud of your work its job satisfaction to clean it up and pr...
- Mike (38/40) May 12 2008 It's code that only gets compiled in a debug build.
- Ty Tower (3/55) May 12 2008 Thanks Mike - Missed it on the first pass but Note for Learners like me
- Robert Fraser (3/5) May 11 2008 Both JDT and Descent let you choose. Window > Preferences > Java/D >
- Frits van Bommel (26/32) May 12 2008 I think I know what he means: unfortunately, Descent doesn't seem to pay...
- Mike (6/32) May 12 2008 Exactly. It seems to do it only with the first case, however.
- Frits van Bommel (5/5) May 12 2008 Frits van Bommel wrote:
- Mike (7/12) May 12 2008 Thanks! I didn't know it was a Descent bug (would have reported that lon...
- Frits van Bommel (3/15) May 12 2008 Well if it isn't a bug one of the devs will hopefully mark it invalid
- Robert Fraser (2/18) May 12 2008 Nope; it's a bug; thanks for reporting it.
- Ary Borenszweig (3/36) May 10 2008 I forgot to tell in the release, but Descent now stops execution at the
- janderson (8/57) May 10 2008 Here's a tip:
- janderson (5/68) May 10 2008 On further thought that might not work. I'm not sure what would be in
- Simen Kjaeraas (20/31) May 11 2008 =
- Fawzi Mohamed (11/35) May 10 2008 I recently had to look for a similar error.
- Jason House (5/17) May 10 2008 Do a try catch at global scope and use the member variables of the excep...
- Ty Tower (6/7) May 10 2008 to print out extra detail. Tango exceptions include file and line numbe...
- Jussi Jumppanen (9/12) May 12 2008 FWIW the Zeus IDE is fully scriptable and also has support
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 ??
May 09 2008
"Tower Ty" <tytower hotmail.com.au> wrote in message news:g02qih$16tn$1 digitalmars.com...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 ??Is this a *compiler* error? Are you *sure*? Do you get the error when you compile the program or when you run it?
May 09 2008
Jarrett Billingsley Wrote:"Tower Ty" <tytower hotmail.com.au> wrote in message news:g02qih$16tn$1 digitalmars.com...No of course it is a run time error and I'm still looking for it , Jarrett sorrytango.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 ??Is this a *compiler* error? Are you *sure*? Do you get the error when you compile the program or when you run it?
May 09 2008
"Tower Ty" <towerty msn.com.au> wrote in message news:g038l7$230k$1 digitalmars.com...Jarrett Billingsley Wrote:Yea, that's kind of a problem with getting uncaught exceptions in the abscence of the stack traces that reflection allows. Be glad it's such a small program. What I recommend doing is either step through it in a debugger (if you have one set up), or use debugging output statements. If you're not familiar with the trick of debugging output statements, it's like this: Start with main() and sprinkle normal output statements through it. For instance, if your main() is like this: void main() { someFunc(); if(something) doSomething(); anotherFunc(); yetAnotherFunc(); } 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; } Obviously, copy/paste helps there ;) Run that and you'll get something like: 1 2 5 tango.core.Exception.IllegalArgumentException: Argument not valid In this case, we know the if() ended up false and "doSomething()" was skipped, and we also know the exception was thrown somewhere in "anotherFunc()". So rip those "Stdout's" out of there, and do the same thing in "anotherFunc()". Keep drilling down like that until you find the problem. I do that all the time in my own code (because so far I've been too lazy to actually get a debugger set up with D :) )."Tower Ty" <tytower hotmail.com.au> wrote in message news:g02qih$16tn$1 digitalmars.com...No of course it is a run time error and I'm still looking for it , Jarrett sorrytango.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 ??Is this a *compiler* error? Are you *sure*? Do you get the error when you compile the program or when you run it?
May 09 2008
Nick Sabalausky Wrote:"Tower Ty" <towerty msn.com.au> wrote in message news:g038l7$230k$1 digitalmars.com...ThanksJarrett Billingsley Wrote:Yea, that's kind of a problem with getting uncaught exceptions in the abscence of the stack traces that reflection allows. Be glad it's such a small program. What I recommend doing is either step through it in a debugger (if you have one set up), or use debugging output statements. If you're not familiar with the trick of debugging output statements, it's like this: Start with main() and sprinkle normal output statements through it. For instance, if your main() is like this: void main() { someFunc(); if(something) doSomething(); anotherFunc(); yetAnotherFunc(); } 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; } Obviously, copy/paste helps there ;) Run that and you'll get something like: 1 2 5 tango.core.Exception.IllegalArgumentException: Argument not valid In this case, we know the if() ended up false and "doSomething()" was skipped, and we also know the exception was thrown somewhere in "anotherFunc()". So rip those "Stdout's" out of there, and do the same thing in "anotherFunc()". Keep drilling down like that until you find the problem. I do that all the time in my own code (because so far I've been too lazy to actually get a debugger set up with D :) )."Tower Ty" <tytower hotmail.com.au> wrote in message news:g02qih$16tn$1 digitalmars.com...No of course it is a run time error and I'm still looking for it , Jarrett sorrytango.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 ??Is this a *compiler* error? Are you *sure*? Do you get the error when you compile the program or when you run it?
May 10 2008
On Sat, 10 May 2008 08:12:25 +0200, Nick Sabalausky <a 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/
May 10 2008
"Mike" <vertex gmx.at> wrote in message news:op.uaxjm1sjkgfkbn lucia...On Sat, 10 May 2008 08:12:25 +0200, Nick Sabalausky <a a.a> wrote:You've just made me feel incredibly stupid. That particular "Why in the world did that never occur to me?" kind of stupid. My forehead still hurts from the smack. ;) I'll have to attempt that next time I use an IDE that has programmable macros (Visual Studio). Hmm, I wonder if C::B has macros...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.Heh, yup. Same thing here. I always think of it like playing that old "HiLo" number-guessing game that used to be a staple of learning a new language.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.I find that turning a single-statement if into a {} block when needed is trivial enough of a change (almost second-nature) to justify keeping single-statement if's in a nice compact {}-less form (unless the clause or single-statement is long enough to be broken into multiple lines for readability). But I'm really compulsive when it comes to code formatting anyway (everything's gotta be "just so" or I can't focus, kinda like that TV detective Monk, albiet far less severe ;) ).
May 10 2008
On Sat, 10 May 2008 11:03:38 +0200, Nick Sabalausky <a a.a> wrote:You've just made me feel incredibly stupid. That particular "Why in the world did that never occur to me?" kind of stupid. My forehead still hurts from the smack. ;):)I find that turning a single-statement if into a {} block when needed is trivial enough of a change (almost second-nature) to justify keeping single-statement if's in a nice compact {}-less form (unless the clause or single-statement is long enough to be broken into multiple lines for readability). But I'm really compulsive when it comes to code formatting anyway (everything's gotta be "just so" or I can't focus, kinda like that TV detective Monk, albiet far less severe ;) ).Yeah, I hate it when Eclipse starts to put my case statements on the wrong indentation level. That supports the theory that programmers often tend to have a little trace of authism in their personality. Sometimes small details can drive me mad and I spend lots of time formatting console output so that it lines up neatly or stuff like that. Another thing about Stdout debugging: it's nice to define an alias for Stdout in a debug { } block and use that alias for debug messages, preferably in a module that's used everywhere in a project. I do that since once, back in my C++ days, one of my "in here" couts went into production - the alias prevents that. -Mike -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
May 11 2008
Mike Wrote:On Sat, 10 May 2008 11:03:38 +0200, Nick Sabalausky <a a.a> wrote:If you are proud of your work its job satisfaction to clean it up and pretty up the output. Can you explain the debug{} a bit more please Mike . What does that look like and how is it used?You've just made me feel incredibly stupid. That particular "Why in the world did that never occur to me?" kind of stupid. My forehead still hurts from the smack. ;):)I find that turning a single-statement if into a {} block when needed is trivial enough of a change (almost second-nature) to justify keeping single-statement if's in a nice compact {}-less form (unless the clause or single-statement is long enough to be broken into multiple lines for readability). But I'm really compulsive when it comes to code formatting anyway (everything's gotta be "just so" or I can't focus, kinda like that TV detective Monk, albiet far less severe ;) ).Yeah, I hate it when Eclipse starts to put my case statements on the wrong indentation level. That supports the theory that programmers often tend to have a little trace of authism in their personality. Sometimes small details can drive me mad and I spend lots of time formatting console output so that it lines up neatly or stuff like that. Another thing about Stdout debugging: it's nice to define an alias for Stdout in a debug { } block and use that alias for debug messages, preferably in a module that's used everywhere in a project. I do that since once, back in my C++ days, one of my "in here" couts went into production - the alias prevents that. -Mike -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
May 11 2008
On Mon, 12 May 2008 00:22:39 +0200, Tower Ty <tytower hotmail.com> wrote= :Can you explain the debug{} a bit more please Mike . What does that =look like and how is it used?It's code that only gets compiled in a debug build. Here's roughly what I do: debug { alias Stdout dbg; } Later on I use Stdout for every normal output, but dbg for temporary deb= ug = messages: <example> Stdout("Initializing warp drive ...").newline; // this should be in the = = console in debug and release mode WarpEngine.prepareUnipolarMatrixPhalanxThingie(unipolar); dbg("first call ok, foo =3D ")(WarpEngine.foo).newline; // this should b= e = removed before release WarpEngine.resetWarpParameterFieldConstants(1, 2, 1701); dbg("second call ok, bar =3D ")(WarpEngine.bar).newline; WarpEngine.initializeWarpNacelles(BOTH); dbg("third call ok, baz =3D ")(WarpEngine.baz).newline; WarpEngine.removeTribbles(all); dbg("fourth call ok, now engaging").newline; WarpEngine.engage(); Stdout("Warp drive ready.").newline; </example> Those dbg Stdouts should be removed in a release build. But every now an= d = then you forget to remove one and it ends up in production. So if you no= w = compile this with the -release flag, the alias never gets defined and = every dbg call still in there yields a syntax error. -Mike PS: I'm NOT a Star Trek fan :) -- = Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
May 12 2008
Mike Wrote:On Mon, 12 May 2008 00:22:39 +0200, Tower Ty <tytower hotmail.com> wrote:Can you explain the debug{} a bit more please Mike . What does that look like and how is it used?It's code that only gets compiled in a debug build. Here's roughly what I do:debug { alias Stdout dbg; } Compile with -debug switch on! Later on I use Stdout for every normal output, but dbg for temporary debug messages: <example> Stdout("Initializing warp drive ...").newline; // this should be in the console in debug and release mode WarpEngine.prepareUnipolarMatrixPhalanxThingie(unipolar); dbg("first call ok, foo = ")(WarpEngine.foo).newline; // this should be removed before release WarpEngine.resetWarpParameterFieldConstants(1, 2, 1701); dbg("second call ok, bar = ")(WarpEngine.bar).newline; WarpEngine.initializeWarpNacelles(BOTH); dbg("third call ok, baz = ")(WarpEngine.baz).newline; WarpEngine.removeTribbles(all); dbg("fourth call ok, now engaging").newline; WarpEngine.engage(); Stdout("Warp drive ready.").newline; </example> Those dbg Stdouts should be removed in a release build. But every now and then you forget to remove one and it ends up in production. So if you now compile this with the -release flag, the alias never gets defined and every dbg call still in there yields a syntax error. -Mike PS: I'm NOT a Star Trek fan :) -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/Thanks Mike - Missed it on the first pass but Note for Learners like me Compile with -debug switch on!
May 12 2008
Mike wrote:Yeah, I hate it when Eclipse starts to put my case statements on the wrong indentation level.Both JDT and Descent let you choose. Window > Preferences > Java/D > Code Style > Formatter > Edit... > Indentation
May 11 2008
Robert Fraser wrote:Mike wrote:I think I know what he means: unfortunately, Descent doesn't seem to pay attention to that setting when you're just typing code. If I try to type --- void foo(int bar) { switch (bar) { case 1: } } --- I instead get: --- void foo(int bar) { switch (bar) { case 1: } } --- Note the indenting of 'case'. This is with the checkbox for [Indent] "'case'/'default' statements within 'switch'" turned on. And it happens whether or not I press 'tab' before typing 'case'. (If I use tab to manually indent the 'case', it *unindents* the moment I hit 'e'!) Pressing Ctrl-Shift-F fixes the indentation; this seems to be an auto-indenting issue, not a formatter issue. (Descent 0.5.2.20080501, Eclipse 3.2.2 / M20070212-1330 (Ubuntu version: 3.2.2-5ubuntu2))Yeah, I hate it when Eclipse starts to put my case statements on the wrong indentation level.Both JDT and Descent let you choose. Window > Preferences > Java/D > Code Style > Formatter > Edit... > Indentation
May 12 2008
On Mon, 12 May 2008 13:06:45 +0200, Frits van Bommel <fvbommel REMwOVExCAPSs.nl> wrote:Robert Fraser wrote:I think I know what he means: unfortunately, Descent doesn't seem to pay attention to that setting when you're just typing code. If I try to type --- void foo(int bar) { switch (bar) { case 1: } } --- I instead get: --- void foo(int bar) { switch (bar) { case 1: } } --- Note the indenting of 'case'. This is with the checkbox for [Indent] "'case'/'default' statements within 'switch'" turned on. And it happens whether or not I press 'tab' before typing 'case'. (If I use tab to manually indent the 'case', it *unindents* the moment I hit 'e'!) Pressing Ctrl-Shift-F fixes the indentation; this seems to be an auto-indenting issue, not a formatter issue. (Descent 0.5.2.20080501, Eclipse 3.2.2 / M20070212-1330 (Ubuntu version: 3.2.2-5ubuntu2))Exactly. It seems to do it only with the first case, however. -Mike -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
May 12 2008
Frits van Bommel wrote: [description of switch/case indent bug] I figured since I took the time to type that up I might as well officially report it in trac: <http://dsource.org/projects/descent/ticket/82>
May 12 2008
On Mon, 12 May 2008 22:41:32 +0200, Frits van Bommel <fvbommel REMwOVExCAPSs.nl> wrote:Frits van Bommel wrote: [description of switch/case indent bug] I figured since I took the time to type that up I might as well officially report it in trac: <http://dsource.org/projects/descent/ticket/82>Thanks! I didn't know it was a Descent bug (would have reported that long ago), just assumed that I didn't find the correct setting :) -Mike -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
May 12 2008
Mike wrote:On Mon, 12 May 2008 22:41:32 +0200, Frits van Bommel <fvbommel REMwOVExCAPSs.nl> wrote:Well if it isn't a bug one of the devs will hopefully mark it invalid and tell us how to configure it to do what we want :).Frits van Bommel wrote: [description of switch/case indent bug] I figured since I took the time to type that up I might as well officially report it in trac: <http://dsource.org/projects/descent/ticket/82>Thanks! I didn't know it was a Descent bug (would have reported that long ago), just assumed that I didn't find the correct setting :)
May 12 2008
Frits van Bommel wrote:Mike wrote:Nope; it's a bug; thanks for reporting it.On Mon, 12 May 2008 22:41:32 +0200, Frits van Bommel <fvbommel REMwOVExCAPSs.nl> wrote:Well if it isn't a bug one of the devs will hopefully mark it invalid and tell us how to configure it to do what we want :).Frits van Bommel wrote: [description of switch/case indent bug] I figured since I took the time to type that up I might as well officially report it in trac: <http://dsource.org/projects/descent/ticket/82>Thanks! I didn't know it was a Descent bug (would have reported that long ago), just assumed that I didn't find the correct setting :)
May 12 2008
Nick Sabalausky escribió:"Tower Ty" <towerty msn.com.au> wrote in message news:g038l7$230k$1 digitalmars.com...I forgot to tell in the release, but Descent now stops execution at the point where an uncaught exception is thrown when debugging with ddbg.Jarrett Billingsley Wrote:Yea, that's kind of a problem with getting uncaught exceptions in the abscence of the stack traces that reflection allows. Be glad it's such a small program. What I recommend doing is either step through it in a debugger"Tower Ty" <tytower hotmail.com.au> wrote in message news:g02qih$16tn$1 digitalmars.com...No of course it is a run time error and I'm still looking for it , Jarrett sorrytango.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 ??Is this a *compiler* error? Are you *sure*? Do you get the error when you compile the program or when you run it?
May 10 2008
Nick Sabalausky wrote: <snip>If you're not familiar with the trick of debugging output statements, it's like this: Start with main() and sprinkle normal output statements through it. For instance, if your main() is like this: void main() { someFunc(); if(something) doSomething(); anotherFunc(); yetAnotherFunc(); } 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; } Obviously, copy/paste helps there ;) Run that and you'll get something like: 1 2 5 tango.core.Exception.IllegalArgumentException: Argument not valid In this case, we know the if() ended up false and "doSomething()" was skipped, and we also know the exception was thrown somewhere in "anotherFunc()". So rip those "Stdout's" out of there, and do the same thing in "anotherFunc()". Keep drilling down like that until you find the problem. I do that all the time in my own code (because so far I've been too lazy to actually get a debugger set up with D :) ).Here's a tip: Use: __FILE__, __LINE__ in your arguments. That way you don't need to keep changing the value. I bet one could write a mixin that would do this automatically and you'd simply wrap each function in that mixin. -Joel
May 10 2008
janderson wrote:Nick Sabalausky wrote: <snip>On further thought that might not work. I'm not sure what would be in __FILE__ and __LINE__. However the mixin could still print out the actual code that was just before the ";". -JoelIf you're not familiar with the trick of debugging output statements, it's like this: Start with main() and sprinkle normal output statements through it. For instance, if your main() is like this: void main() { someFunc(); if(something) doSomething(); anotherFunc(); yetAnotherFunc(); } 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; } Obviously, copy/paste helps there ;) Run that and you'll get something like: 1 2 5 tango.core.Exception.IllegalArgumentException: Argument not valid In this case, we know the if() ended up false and "doSomething()" was skipped, and we also know the exception was thrown somewhere in "anotherFunc()". So rip those "Stdout's" out of there, and do the same thing in "anotherFunc()". Keep drilling down like that until you find the problem. I do that all the time in my own code (because so far I've been too lazy to actually get a debugger set up with D :) ).Here's a tip: Use: __FILE__, __LINE__ in your arguments. That way you don't need to keep changing the value. I bet one could write a mixin that would do this automatically and you'd simply wrap each function in that mixin. -Joel
May 10 2008
On Sun, 11 May 2008 02:04:00 +0200, janderson <askme me.com> wrote:janderson wrote:to =Here's a tip: Use: __FILE__, __LINE__ in your arguments. That way you don't need =keep changing the value. I bet one could write a mixin that would do this automatically and ==you'd simply wrap each function in that mixin. -JoelOn further thought that might not work. I'm not sure what would be in=__FILE__ and __LINE__. However the mixin could still print out the =actual code that was just before the ";". -Joelimport std.stdio; import std.traits; template _debug(alias f, int line =3D __LINE__, string file =3D __FILE__= ) { ReturnType!(f) _debug(ParameterTypeTuple!(f) u) { writefln("%s(%d) executed.", file, line); return f(u); } } Usage: _debug(function)(parameters); There might be a simpler, more prettiful way to find the return type and= = parameters, but this works. -- Simen
May 11 2008
On 2008-05-10 06:34:47 +0200, Tower Ty <towerty msn.com.au> said:Jarrett Billingsley Wrote:I recently had to look for a similar error. I think the easiest thing is to compile everything with -g and use a debugger. Then put a breackpoint when the exception is created (or in the handler to create the stack trace: traceContext in tango): genobj.d:916 (gdc) genobj.d:910 (dmd) please not that there is an open bug wrt. this with out of bounds exceptions on macintosh and Linux with gdc the stack can get garbled http://www.dsource.org/projects/tango/ticket/1094 Fawzi"Tower Ty" <tytower hotmail.com.au> wrote in message news:g02qih$16tn$1 digitalmars.com...No of course it is a run time error and I'm still looking for it , Jarrett sorrytango.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 ??Is this a *compiler* error? Are you *sure*? Do you get the error when you compile the program or when you run it?
May 10 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.
May 10 2008
Jason House Wrote: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.<< Now thats the stuff . Its just a matter of simplifying it for learners . If it doesn't give a line ,or statement ,or argument, you end up like a stunned mullet for a while. Thanks for responsesDo a try catch at global scope and use the member variables of the exception
May 10 2008
Nick Sabalausky Wrote:I'll have to attempt that next time I use an IDE that has programmable macros (Visual Studio). Hmm, I wonder if C::B has macros...FWIW the Zeus IDE is fully scriptable and also has support for the D programming language (ie code folding, syntax highlighting etc). With a bit of tweaking Zeus can even be configure to let you script using DMDScript: http://www.zeusedit.com/forum/viewtopic.php?t=225 Jussi Jumppanen Author: Zeus for Windows IDE
May 12 2008