[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: make check and C++ exceptions

From: Alexandre Duret-Lutz
Subject: Re: make check and C++ exceptions
Date: Sun, 14 Sep 2003 12:17:21 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)


Sorry for the delay.  Maybe you finally solved this?

>>> "Steve" == Steve Hutton <address@hidden> writes:

 Steve> Make check succeeds (as expected) when my test program
 Steve> returns 0, but it fails (not what I expected) when the same
 Steve> test program has thrown and caught a C++ exception.


 Steve> try
 Steve> {
 Steve> throwError();
 Steve> }
 Steve> catch(std::exception& e)
 Steve> {
 Steve> std::cout<<"cought: "<<e.what()<<std::endl;
 Steve> }
 Steve> return 0;


 Steve> make[1]: Entering directory `/home/shutton/dev/make_check'
 Steve> PASS: return0nothrow
 Steve> FAIL: return0throw
 Steve> ===================
 Steve> 1 of 2 tests failed


 Steve> $ ./
 Steve> return0nothrow returned 0
 Steve> cought: hello
 Steve> return0throw returned 0

Note that when return0throw runs it prints "cought: hello" in
this second run, while it did not during "make check" above.
Too me, this indicates that the exception was not caught during
the first run.  Perhaps it's not the same code which is being
executed?  I'm sorry I don't have any other idea.
Alexandre Duret-Lutz

reply via email to

[Prev in Thread] Current Thread [Next in Thread]