c++.dos.16-bits - Exceptions
- Rajiv Bhagwat (17/17) Mar 21 2002 The following program catches exceptions properly when compiled for 32
- Walter (6/23) Mar 21 2002 I just ran it (under XP) compiled as:
- Rajiv Bhagwat (6/34) Mar 22 2002 It is failing under Win98 SE. With lots of (other) problems reported for...
- Walter (4/42) Mar 22 2002 Try putting fflush(stdout) after each printf.
- Walter (5/43) Mar 22 2002 Ok, I found a win98 machine and tried it, and it works as expected. I do...
- Rajiv Bhagwat (7/55) Mar 24 2002 Walter, thanks for solving the problem. Removing -Nc from the CFLAGS doe...
The following program catches exceptions properly when compiled for 32 bits(-mn), but just prints 'abnormal program termination' for 16 bit compiles (-ml). #include <stdio.h> int main(int argc,char *argv[]){ try { throw "here it comes"; } catch (const char *e) { printf("Exception: %s", e); } catch (...){ printf("oh oh"); } return 0; } How about a quick fix?
Mar 21 2002
I just ran it (under XP) compiled as: sc test -Ae -ml and it works as expected. I don't know why it isn't working for you. -Walter "Rajiv Bhagwat" <dataflow vsnl.com> wrote in message news:a7cnar$gs8$1 digitaldaemon.com...The following program catches exceptions properly when compiled for 32 bits(-mn), but just prints 'abnormal program termination' for 16 bit compiles (-ml). #include <stdio.h> int main(int argc,char *argv[]){ try { throw "here it comes"; } catch (const char *e) { printf("Exception: %s", e); } catch (...){ printf("oh oh"); } return 0; } How about a quick fix?
Mar 21 2002
It is failing under Win98 SE. With lots of (other) problems reported for XP, the chances of me switching over to XP immediately are slim. And I know you don't have Win98! What to do now? - Rajiv "Walter" <walter digitalmars.com> wrote in message news:a7d61b$pae$1 digitaldaemon.com...I just ran it (under XP) compiled as: sc test -Ae -ml and it works as expected. I don't know why it isn't working for you. -Walter "Rajiv Bhagwat" <dataflow vsnl.com> wrote in message news:a7cnar$gs8$1 digitaldaemon.com...The following program catches exceptions properly when compiled for 32 bits(-mn), but just prints 'abnormal program termination' for 16 bit compiles (-ml). #include <stdio.h> int main(int argc,char *argv[]){ try { throw "here it comes"; } catch (const char *e) { printf("Exception: %s", e); } catch (...){ printf("oh oh"); } return 0; } How about a quick fix?
Mar 22 2002
Try putting fflush(stdout) after each printf. "Rajiv Bhagwat" <dataflow vsnl.com> wrote in message news:a7f7mv$1qkj$1 digitaldaemon.com...It is failing under Win98 SE. With lots of (other) problems reported forXP,the chances of me switching over to XP immediately are slim. And I know you don't have Win98! What to do now? - Rajiv "Walter" <walter digitalmars.com> wrote in message news:a7d61b$pae$1 digitaldaemon.com...I just ran it (under XP) compiled as: sc test -Ae -ml and it works as expected. I don't know why it isn't working for you. -Walter "Rajiv Bhagwat" <dataflow vsnl.com> wrote in message news:a7cnar$gs8$1 digitaldaemon.com...The following program catches exceptions properly when compiled for 32 bits(-mn), but just prints 'abnormal program termination' for 16 bit compiles (-ml). #include <stdio.h> int main(int argc,char *argv[]){ try { throw "here it comes"; } catch (const char *e) { printf("Exception: %s", e); } catch (...){ printf("oh oh"); } return 0; } How about a quick fix?
Mar 22 2002
Ok, I found a win98 machine and tried it, and it works as expected. I don't know why it fails for you. -Walter "Rajiv Bhagwat" <dataflow vsnl.com> wrote in message news:a7f7mv$1qkj$1 digitaldaemon.com...It is failing under Win98 SE. With lots of (other) problems reported forXP,the chances of me switching over to XP immediately are slim. And I know you don't have Win98! What to do now? - Rajiv "Walter" <walter digitalmars.com> wrote in message news:a7d61b$pae$1 digitaldaemon.com...I just ran it (under XP) compiled as: sc test -Ae -ml and it works as expected. I don't know why it isn't working for you. -Walter "Rajiv Bhagwat" <dataflow vsnl.com> wrote in message news:a7cnar$gs8$1 digitaldaemon.com...The following program catches exceptions properly when compiled for 32 bits(-mn), but just prints 'abnormal program termination' for 16 bit compiles (-ml). #include <stdio.h> int main(int argc,char *argv[]){ try { throw "here it comes"; } catch (const char *e) { printf("Exception: %s", e); } catch (...){ printf("oh oh"); } return 0; } How about a quick fix?
Mar 22 2002
Walter, thanks for solving the problem. Removing -Nc from the CFLAGS does make the program work as expected. - Rajiv "Walter" <walter digitalmars.com> wrote in message news:a7ftmf$1ij2$1 digitaldaemon.com...Ok, I found a win98 machine and tried it, and it works as expected. Idon'tknow why it fails for you. -Walter "Rajiv Bhagwat" <dataflow vsnl.com> wrote in message news:a7f7mv$1qkj$1 digitaldaemon.com...32It is failing under Win98 SE. With lots of (other) problems reported forXP,the chances of me switching over to XP immediately are slim. And I know you don't have Win98! What to do now? - Rajiv "Walter" <walter digitalmars.com> wrote in message news:a7d61b$pae$1 digitaldaemon.com...I just ran it (under XP) compiled as: sc test -Ae -ml and it works as expected. I don't know why it isn't working for you. -Walter "Rajiv Bhagwat" <dataflow vsnl.com> wrote in message news:a7cnar$gs8$1 digitaldaemon.com...The following program catches exceptions properly when compiled forbits(-mn), but just prints 'abnormal program termination' for 16 bit compiles (-ml). #include <stdio.h> int main(int argc,char *argv[]){ try { throw "here it comes"; } catch (const char *e) { printf("Exception: %s", e); } catch (...){ printf("oh oh"); } return 0; } How about a quick fix?
Mar 24 2002