Try the attached example...it exits gracefully in with g++ at least...
/J
(oh, and I assume your reply should have gone to the list really)
itinerants wrote:
> On 4/11/07 5:55 pm, "Jacek Sieka" <arn...@gm...> wrote:
>
>>> 2. DirectoryListing::loadFile need to be specified as throwing
>>> FileException, SimpleXMLException - corrupt file lists, as well as the
>>> routine itself, throw more than just "Exception". I'm not a c++ expert, but
>>> my understanding of the "throw" thing in the function prototype is that if
>>> you throw something other than what's listed, you get a runtime exception
>>> and the prog exits if it isn't handled - can't see that it is being handled.
>>> This certainly killed my version until I added the new specifiers.
>> *Exception inherit from Exception so it should be safe...although I'm sure
>> there are lots of places
>> in the code with bad specifiers (msvc didn't enforce this so I never cared
>> really much about
>> it)...currently I use a gcc switch to disable the runtime exception =)
>
> I've searched high and low, and can't find out what the inheritance story is
> here - sounds reasonable.
> All I CAN say is that it killed my CodeWarrior program until I explicitly
> listed the other exceptions.
> Given that you aren't really using them, perhaps making the "throw" specs at
> least a #define in some future version might be an idea - then *I* can turn
> them off too!
>
> Regards
>
> Roger
>
>
>
|