Re: Exceptions and MFC

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Nils (slim_at_web.de)
Date: 03/05/04


Date: Fri, 5 Mar 2004 16:23:05 +0100

Hi,
the vector is not empty. At the position 0 is a pointer to an
ModalDialog.... So I wan't to Exit the dialog..
I think the exception comes, while the dialog is not finished created.
I have derived an own dialog, that uses synchonization.
At this time, the dialog ist locked.
The Exception has the ID 0xc00000005... so it is an Access Exception.

But I can't catch it.

"Stephen Howe" <stephenPOINThoweATtns-globalPOINTcom> schrieb im Newsbeitrag
news:el52NZrAEHA.2308@tk2msftngp13.phx.gbl...
> > Can anyone please help me, why the exception is not catched?
>
> Is it possible for your vector to empty? If it is,
>
> vec->at(0))
>
> with throw a std C++ exception. That is what at() rmeans :- throw an
> exception if the index is out of range and it will be if the vector is
> empty.
>
> Why not do
>
> assert(!vec->empty());
>
> before this and run the debug version.
>
> Stephen Howe
>
>



Relevant Pages

  • Re: while c = f.read(1)
    ... The problem with interpreting empty as false is that empty ... > If Python is too "wild" for your taste, ... In that case you wouldn't return an empty sequence if you wanted ... a false value in a sequence context but would throw an exception. ...
    (comp.lang.python)
  • Re: Question about Authorization Manager
    ... They do throw an exception if an empty task is passed for a check. ... throwing an exception when the specified task contains an empty nested task ... operations that are direct children of the specified task. ...
    (microsoft.public.dotnet.security)
  • Re: Exceptions and MFC
    ... At the position 0 is a pointer to an ... So I wan't to Exit the dialog.. ... As it almost certainly indicates a bug in your program, ... If you want to know why you didn't catch it, a Windows structured exception ...
    (microsoft.public.vc.mfc)
  • Re: Checking list by using of exception
    ... (a list has a false boolean value when it is empty) ... If you insist on using an exception (and assuming list_of_files is ... But I would not reccomend it. ... Gabriel Genellina ...
    (comp.lang.python)
  • Re: Check if Function Exists
    ... if the error is thrown and caught in the catch block that would be ... You are ignoring the fact that for each executed statement entering of an ... a block would throw an exception without executing this block to begin with. ... Even if the `catch' block is empty, ...
    (comp.lang.javascript)