Re: typeinitializationexception in module

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Saurabh (saurabh_at_nagpurcity.net)
Date: 07/06/04


Date: Tue, 6 Jul 2004 09:59:00 +0100

TypeInitializationException is thrown if something has gone wrong in type
initialization. Well if your constructor is calling lots of other things,
and one of them throws an exception, the constructor will throw a
typeInitializationException with the main exception set as inner exception.

--Saurabh
"Emilio Martin" <emilio@intellinovaREMOVE.com> wrote in message
news:Ohfa6EzYEHA.3972@TK2MSFTNGP12.phx.gbl...
> Hi,
>
> I'm getting a system.typeinitializationexception when referencing a
module.
>
> The problem only oocurs in my deployed program, not on in my development
> environment.
>
> Any Ideas?
>
> Many Thanks
>
>



Relevant Pages

  • Re: ownerdrawing (on a components canvas): comitting any sins here?
    ... >> But constructors that fail without raising an exception are right out. ... > I can't remember how I generated the error in the Constructor ... On the outside, when calling them, they ... to set Self to nil. ...
    (alt.comp.lang.borland-delphi)
  • Re: DbC & Exceptions & Style
    ... exception. ... Different ways the constructor can fail ... to avoid writing code that converts GUI data into objects, ... All domain objects must now provide a default constructor. ...
    (comp.object)
  • Re: Controlled types and exception safety
    ... >> propagate an exception. ... >> For an Adjust invoked as part of an assignment operation, ... But a user-defined constructor is ... a user-defined constructor has just turned on the ...
    (comp.lang.ada)
  • Re: is such exception handling approach good?
    ... There is nothing wrong with throwing from constructor. ... It may be a good design, it may not be a good design from user's point ... resource API to free-up the resource on exception. ... change something - that is not initialization. ...
    (microsoft.public.vc.language)
  • Re: Question concerning object-oriented programming
    ... constructor the inspectof the state fails to verify key ... Better yet the constructor could throw an exception. ... opposed to stateless) object can know if it is in an invalid state. ...
    (comp.programming)