[ITK] Exception occurence

Lowekamp, Bradley (NIH/NLM/LHC) [C] blowekamp at mail.nih.gov
Tue Nov 22 14:06:19 EST 2016


Hello,

Have you tried placing a try {…} catch{std::exception &e) {…} around you code?

http://www.cplusplus.com/doc/tutorial/exceptions/

Brad

> On Nov 22, 2016, at 2:03 PM, Constantinus Spanakis <c.spanakis83 at gmail.com> wrote:
> 
> Hello. I tried to compute Normalized Mutual information for a number of different transformations
> and I get an exception. Them I tried to do some debugging and Microsoft Visual Studio directed me to unhandld.cpp and specifically at line 40. 
> 
> /***
> *unhandld.cxx - Wrapper to call terminate() when an exception goes unhandled.
> *
> *       Copyright (c) Microsoft Corporation. All rights reserved.
> *
> *Purpose:
> *       Wrapper to call terminate() when an exception goes unhandled.
> ****/
> 
> #include <windows.h>
> #include <ehdata.h>
> #include <eh.h>
> #include <ehhooks.h>
> #include <ehassert.h>
> #include <awint.h>
> #include <internal.h>
> #include <stdlib.h>
> 
> #pragma hdrstop
> 
> #include <sect_attribs.h>
> 
> extern "C" int  __cdecl __CxxSetUnhandledExceptionFilter(void);
> 
> /////////////////////////////////////////////////////////////////////////////
> //
> // __CxxUnhandledExceptionFilter - if the exception is ours, call terminate();
> //
> // Returns:
> //      If the exception was MSVC C++ EH, does not return.
> //      If the previous filter was NULL, returns EXCEPTION_CONTINUE_SEARCH.
> //      Otherwise returns value returned by previous filter.
> //
> LONG WINAPI __CxxUnhandledExceptionFilter(
>         LPEXCEPTION_POINTERS pPtrs
>         )
> {
>         if (PER_IS_MSVC_PURE_OR_NATIVE_EH((EHExceptionRecord*)(pPtrs->ExceptionRecord))) {
>                 terminate();            // Does not return
>                 return EXCEPTION_EXECUTE_HANDLER;
>         }
>         return EXCEPTION_CONTINUE_SEARCH;
> }
> 
> 
> The break point is at return EXCEPTION_EXECUTE_HANDLER;
> 
> What could envoke this exception?
> 
> Thank you in advance
> 
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/mailman/listinfo/community



More information about the Community mailing list