typeload exception instead of own exception occurs

  • Thread starter Thread starter Roland Hochmann
  • Start date Start date
R

Roland Hochmann

Hello all,

we develop an appplication with CF 1.0 SP3 in C#.
On program start I load a lot of data from files.
I built an own exception that throws when a file is missing or the
wrong file is loaded to inform the user.
But when I throw the user defined exception, the type of exception is
changed: now it's a TypeloadException. For all exceptions i have a
"catch" around my Appplication.Run method in Main () one for my own
exceptions and one for the system exceptions.

I thought no line of code can be executed 'til the first "catch" is
found in the stack of the application!?!?
How can the exception type change or alternatively can be thrown
another exception of tzhe framework?

Any help would be appreciated

Roland
 
What's in your exception handler? An exception within the handler could
easily show this behavior.

-Chris
 
Hello Chris,

I investigated if something is wrong with the exception, and stripped
it down to the constructor only.
But I have the same behavior with it.
I am in the 5th level of callstack when I throw my Exception, it seems
to work ok but in the exception before the last the type is changed to
typeload exception. (the object can not be loaded because of the
error that throws the exception - but this should not be executed)

Roland
 
Hello Daniel,

thanks for the answer.
I have only one thread at this time (GUI).
Therefore it should work.

I tried to make a small code example but there exception handling
works.

I have to try on...

Roland
 
Back
Top