digitalmars.D - classes: Error and Exception
- Martin (18/18) Sep 06 2004 The following gives "segmentation fault", but maybe it should throw an e...
- Jarrett Billingsley (2/2) Sep 06 2004 your code works for me. i run it and it says ERROR!
- Martin (4/6) Sep 06 2004 Interesting, that means, that in Windows D can catch "Segmentation fault...
- Russ Lewis (5/9) Sep 07 2004 This is a known bug/missing feature on Linux. I'm pretty sure that
- Walter (7/16) Sep 09 2004 faults", but
The following gives "segmentation fault", but maybe it should throw an excetion like running out of array limits? I I think that it is almost as common mistake as running out of array bounds. What do you think about this? class Ca{ public: int b; } int main(){ Ca a; try{ a.b=1; } catch(Exception e){ printf("ERROR!\n"); } return 0; }
Sep 06 2004
your code works for me. i run it and it says ERROR! i'm using windows though. i suppose you're using linux?
Sep 06 2004
Interesting, that means, that in Windows D can catch "Segmentation faults", but in linux not. Is it so Walter? In article <chhv3b$1ess$1 digitaldaemon.com>, Jarrett Billingsley says...your code works for me. i run it and it says ERROR! i'm using windows though. i suppose you're using linux?
Sep 06 2004
Martin wrote:Interesting, that means, that in Windows D can catch "Segmentation faults", but in linux not. Is it so Walter?This is a known bug/missing feature on Linux. I'm pretty sure that Walter intends to implement this. Of course, if one of us writes some good example code for him, then it would be much easier for him...
Sep 07 2004
"Russ Lewis" <spamhole-2001-07-16 deming-os.org> wrote in message news:chl3eq$2ru9$1 digitaldaemon.com...Martin wrote:faults", butInteresting, that means, that in Windows D can catch "SegmentationMy experience on low level coding for linux is pretty limited. If someone wants to donate the code for linux that will convert seg faults into exceptions, like the Windows code does in internal\deh.c, I'd love to incorporate it.in linux not. Is it so Walter?This is a known bug/missing feature on Linux. I'm pretty sure that Walter intends to implement this. Of course, if one of us writes some good example code for him, then it would be much easier for him...
Sep 09 2004