Thread overview
Dernel: how does exception handling work?
Feb 20, 2004
Robert M. Münch
Feb 20, 2004
Walter
Feb 20, 2004
Robert M. Münch
Feb 21, 2004
Walter
February 20, 2004
Hi, I had a problem with my code bombing and I found out that it was a problem with a "switch" statement not having a "default" choice. The D compiler inserted code that in this case a SwitchError is thrown.

What do I need to support, that this throw stuff works? What does the D compiler expect to find (exception tables, etc.)?

-- 
Robert M. Münch
Management & IT Freelancer
http://www.robertmuench.de
February 20, 2004
"Robert M. Münch" <robert.muench@robertmuench.de> wrote in message news:opr3ohlty3heztw6@news.digitalmars.com...
> Hi, I had a problem with my code bombing and I found out that it was a problem with a "switch" statement not having a "default" choice. The D compiler inserted code that in this case a SwitchError is thrown.
>
> What do I need to support, that this throw stuff works? What does the D compiler expect to find (exception tables, etc.)?

I don't understand the question. But to fix the problem with the switch, add a default case.


February 20, 2004
On Fri, 20 Feb 2004 09:52:11 -0800, Walter <walter@digitalmars.com> wrote:

> I don't understand the question. But to fix the problem with the switch, add a default case.

Hi Walter, ;-) yes I did this. The problem I get is a stack problem, ESP isn't set right or so. My question is: Do I need to support something special (interrupt, exception handling of the Intel hardware etc.) so that the D compiler generated exception handling code works?

-- 
Robert M. Münch
Management & IT Freelancer
http://www.robertmuench.de
February 21, 2004
"Robert M. Münch" <robert.muench@robertmuench.de> wrote in message news:opr3onpfkmheztw6@news.digitalmars.com...
> On Fri, 20 Feb 2004 09:52:11 -0800, Walter <walter@digitalmars.com> wrote:
>
> > I don't understand the question. But to fix the problem with the switch, add a default case.
>
> Hi Walter, ;-) yes I did this. The problem I get is a stack problem, ESP isn't set right or so. My question is: Do I need to support something special (interrupt, exception handling of the Intel hardware etc.) so that the D compiler generated exception handling code works?

Exception handling is done differently under win32 and linux. The linux version is more OS independent, so if doing a D kernel, I'd go that route.