Re: Exception in a constructor

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"JSheble" <jsheble-NOSPAM@xxxxxxxxxxx> wrote in
news:uHEgyG7XFHA.2348@xxxxxxxxxxxxxxxxxxxx:

> If an exception occurs or is thrown in my constructor, what does
> the constructor actually return? A null?

You can easily write a small program to find out.

Chris.
-------------
C.R. Timmons Consulting, Inc.
http://www.crtimmonsinc.com/
.



Relevant Pages

  • Re: is such exception handling approach good?
    ... I agree with you that there is no exception thrown from constructor. ... there may be exception thrown from other initialization methods, ...
    (microsoft.public.vc.language)
  • Re: main form, IDisposable, and Application.Run
    ... exception is thrown between construction and the method call. ... open forms (which would obviously dispose the form). ... Maybe the exception is being thrown from the constructor after all, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: An exception that throws while it is being thrown, no terminate?
    ... copy constructor exits with an exception during a throw." ... allowed to create a copy *before* the copy is thrown. ... In the following situations exception handling must be ...
    (microsoft.public.vc.language)
  • Re: exception in a constructor
    ... > The net result is memory leak, ... is thrown during step 2, all members constructed so far are destroyed ... used a placement form of new, ... Nor is there if the constructor of the object throws an exception. ...
    (comp.lang.cpp)
  • Using the UnhandlerExceptionEventHandler in a control hosted by IE
    ... I want to handle the 'UnhandledException' in my application, ... constructor, ... I'm forcing a 'Division by zero' exception to test it, ... Prev by Date: ...
    (microsoft.public.dotnet.framework.windowsforms.controls)