digitalmars.D.learn - Cannot make a personalized exception
- Vermi (23/23) May 11 2007 I'm trying to make a custom Exception class with this :
- BCS (3/3) May 11 2007 Reply to Vermi,
- Vermi (3/3) May 11 2007 The code I join don't work, but I tried just copy, past and rename de Li...
-
Stewart Gordon
(6/19)
May 11 2007
- Vermi (7/32) May 14 2007 It was just a try, but deleting the toString function don't change my pr...
- BCS (4/9) May 14 2007 That is a lib file for linux, you shouldn't need to make a lib file of y...
- Chris Nicholson-Sauls (7/21) May 14 2007 I've often wondered. In fact, one of my personal friends with the best ...
- Frits van Bommel (11/25) May 14 2007 Well, over here in the Netherlands English is a required[1] course for 6...
- Mike Parker (7/11) May 14 2007 Actually, there's a scale for this. I can't recall the name of it, but
- Bill Baxter (4/27) May 14 2007 Not to nitpick or anything but I believe you mean "Somebody set *up*
- Chris Nicholson-Sauls (3/32) May 14 2007 You know, just to be anal, I went and looked it up... and you're right. ...
I'm trying to make a custom Exception class with this : class MyException : Exception { static char[] s = "My Exception"; this() { super(s); } char[] toString() { return s; } } it compile well, until I want to throw it :/ When I put the line : throw new MyException(); I get that error : webcache.obj(webcache) Error 42: Symbol Undefined _D4util10linkedlist13TestException7__ClassZ webcache.obj(webcache) Error 42: Symbol Undefined _D4util10linkedlist13TestException5_ctorMFAaZC4util10linkedlist13TestException --- errorlevel 2 The two class ( Exception and thrower class ) are in the same file. I tried Copy / Past examples from the site, but it still donc work. An idea ?
May 11 2007
The code I join don't work, but I tried just copy, past and rename de LinkedList class to LinkedListTestException, and it worked. The Exception is thrown in the get function of the LinkedList class (it's an OutOfBoundsException). Hope you will find what I missed ^^
May 11 2007
"Vermi" <aurelien.vermifuge gmail.com> wrote in message news:f22d6l$tfi$1 digitalmars.com...I'm trying to make a custom Exception class with this : class MyException : Exception { static char[] s = "My Exception"; this() { super(s); } char[] toString() { return s; } }<snip> Any particular reason you're overriding toString to do exactly what it already does? Stewart.
May 11 2007
It was just a try, but deleting the toString function don't change my problem :/ I think the linker cannot find the modules because there are not in it's include path. I will try to compile all the files simultaneously in a single line. The problem is not present when I don't use modules. I saw phobos has a .a file in the lib directory, should my modules have one too ? sorry for my english. Vermi Stewart Gordon Wrote:"Vermi" <aurelien.vermifuge gmail.com> wrote in message news:f22d6l$tfi$1 digitalmars.com...I'm trying to make a custom Exception class with this : class MyException : Exception { static char[] s = "My Exception"; this() { super(s); } char[] toString() { return s; } }<snip> Any particular reason you're overriding toString to do exactly what it already does? Stewart.
May 14 2007
Reply to Vermi,I saw phobos has a .a file in the lib directory, should my modules have one too ?That is a lib file for linux, you shouldn't need to make a lib file of your own.sorry for my english.Why is it that only the forever who have good English apologies for it? :b
May 14 2007
BCS wrote:Reply to Vermi,I've often wondered. In fact, one of my personal friends with the best command of the language is a Netherlander. (Sure their language isn't as far off, but still.) I think the common -- albeit accurate -- axiom of "English is the hardest language to learn" makes them more self-conscious, perhaps? Somebody set us up the bomb. All your base are belong to us. -- Chris Nicholson-SaulsI saw phobos has a .a file in the lib directory, should my modules have one too ?That is a lib file for linux, you shouldn't need to make a lib file of your own.sorry for my english.Why is it that only the forever who have good English apologies for it? :b
May 14 2007
Chris Nicholson-Sauls wrote:BCS wrote:Well, over here in the Netherlands English is a required[1] course for 6 to 8 years[2] of school, so the Dutch speaking English relatively well (on average) is not entirely unexpected. Also, the master's phase of university education is now taught entirely in English. By the way, I've heard that /Dutch/ is actually one of the hardest languages to learn[3]... [1] Or at least, it was for me. I'm not sure what it's like right now, they overhauled the education system just after my year... [2] Depending on the "level" of education you're attending. [3] (as a second language)Reply to Vermi,I've often wondered. In fact, one of my personal friends with the best command of the language is a Netherlander. (Sure their language isn't as far off, but still.) I think the common -- albeit accurate -- axiom of "English is the hardest language to learn" makes them more self-conscious, perhaps? Somebody set us up the bomb. All your base are belong to us.sorry for my english.Why is it that only the forever who have good English apologies for it? :b
May 14 2007
Frits van Bommel wrote:By the way, I've heard that /Dutch/ is actually one of the hardest languages to learn[3]...[3] (as a second language)Actually, there's a scale for this. I can't recall the name of it, but it ranks languages mostly by group according to several criteria. On one end of the scale are latin- and germanic-based languages. On the other end is Chinese. The closer two languages are to each other the easier it is for speakers of each language to learn the other. The farther apart they are, the more difficult to learn.
May 14 2007
Chris Nicholson-Sauls wrote:BCS wrote:Not to nitpick or anything but I believe you mean "Somebody set *up* *us* the bomb." I'm guessing AYBian is not your first language. :-) --bbReply to Vermi,I've often wondered. In fact, one of my personal friends with the best command of the language is a Netherlander. (Sure their language isn't as far off, but still.) I think the common -- albeit accurate -- axiom of "English is the hardest language to learn" makes them more self-conscious, perhaps? Somebody set us up the bomb. All your base are belong to us.I saw phobos has a .a file in the lib directory, should my modules have one too ?That is a lib file for linux, you shouldn't need to make a lib file of your own.sorry for my english.Why is it that only the forever who have good English apologies for it? :b
May 14 2007
Bill Baxter wrote:Chris Nicholson-Sauls wrote:You know, just to be anal, I went and looked it up... and you're right. Heh. -- Chris Nicholson-SaulsBCS wrote:Not to nitpick or anything but I believe you mean "Somebody set *up* *us* the bomb." I'm guessing AYBian is not your first language. :-) --bbReply to Vermi,I've often wondered. In fact, one of my personal friends with the best command of the language is a Netherlander. (Sure their language isn't as far off, but still.) I think the common -- albeit accurate -- axiom of "English is the hardest language to learn" makes them more self-conscious, perhaps? Somebody set us up the bomb. All your base are belong to us.I saw phobos has a .a file in the lib directory, should my modules have one too ?That is a lib file for linux, you shouldn't need to make a lib file of your own.sorry for my english.Why is it that only the forever who have good English apologies for it? :b
May 14 2007