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

Re: typeload exception instead of own exception occurs by ctacke/>

ctacke/>
Mon Jul 04 06:28:26 CDT 2005

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

-Chris


"Roland Hochmann" <r.hochmann@mairdumont.com> wrote in message
news:42c8f663.6971765@news.microsoft.com...
> 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
>
>



Re: typeload exception instead of own exception occurs by Daniel

Daniel
Mon Jul 04 07:36:08 CDT 2005

Show us the code... FYI, your approach of wrapping ApplicationRun with try
catch does not constitute global exception handling (it is not possible with
CF 1.0):
http://www.danielmoth.com/Blog/2004/08/global-exception-handling-net-cf-v10.html

Cheers
Daniel
--
http://www.danielmoth.com/Blog/


"Roland Hochmann" <r.hochmann@mairdumont.com> wrote in message
news:42c8f663.6971765@news.microsoft.com...
> 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
>
>


Re: typeload exception instead of own exception occurs by r

r
Mon Jul 04 07:51:29 CDT 2005

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

On Mon, 4 Jul 2005 07:28:26 -0400, "<ctacke/>"
<ctacke_AT_OpenNETCF_com> wrote:

>What's in your exception handler? An exception within the handler could
>easily show this behavior.
>
>-Chris
>
>
>"Roland Hochmann" <r.hochmann@mairdumont.com> wrote in message
>news:42c8f663.6971765@news.microsoft.com...
>> 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
>>
>>
>
>


Re: typeload exception instead of own exception occurs by r

r
Mon Jul 04 09:25:12 CDT 2005

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



On Mon, 4 Jul 2005 13:36:08 +0100, "Daniel Moth" <dmoth74@hotmail.com>
wrote:

>Show us the code... FYI, your approach of wrapping ApplicationRun with try
>catch does not constitute global exception handling (it is not possible with
>CF 1.0):
>http://www.danielmoth.com/Blog/2004/08/global-exception-handling-net-cf-v10.html
>
>Cheers
>Daniel
>--
>http://www.danielmoth.com/Blog/
>
>
>"Roland Hochmann" <r.hochmann@mairdumont.com> wrote in message
>news:42c8f663.6971765@news.microsoft.com...
>> 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
>>
>>
>