[cfe-dev] Uncaught exceptions do not show what()

Marshall Clow mclow.lists at gmail.com
Fri Oct 21 21:19:53 PDT 2011


On Oct 21, 2011, at 8:30 PM, Nick Walters wrote:

> I am compiling with the latest Clang/LLVM on my Mac (10.7.2). Uncaught exceptions do not display the what() message from a std exception. Here’s my test program:
[ snip ]

> Instead, I just get:
> 
> terminate called after throwing an instance of 'my_exception'
> terminate called without an active exception
> Abort trap: 6

Here's what I get with today's clang (on 10.6.8):

$ clang --version
clang version 3.1 (trunk 142667)
Target: x86_64-apple-darwin10.8.0
Thread model: posix

$ clang++ junk.cpp && ./a.out 
terminate called after throwing an instance of 'my_exception'
  what():  my error occurred
Abort trap

Maybe it's a 10.6 vs. 10.7 thing ?


-- Marshall

Marshall Clow     Idio Software   <mailto:mclow.lists at gmail.com>

A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait).
        -- Yu Suzuki

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20111021/d50c4d9d/attachment.html>


More information about the cfe-dev mailing list