locked
Suppress "NotSupportedException" in WinCE application. RRS feed

  • Question

  • Hi,
    I am working on a WinCE application which created PDf report using ItextSharp Library.

    In This when Install the application and Runs it.
    For the first time It give the error as 'NotSupportedException' which is not handled by my Try..Catch Block.
    Because of this error my Application gets crashed.

    But When we restart the device this error is not observed.

    That means it is generated at first time only. I tried to catch the exception and different turn round but with no success.

    Now I want to suppress this error and give a message box that 'Need to create Pdf Again'.

    Please help me in this as this activity has become time consuming.

    Thanks,
    Sachin Kale
    C# Develper
    Thursday, October 29, 2009 10:28 AM

Answers

  • In our organisation it is found out that

     NotSupportedException : Manifests itself in low memory situations due to (suspect) an issue/bug in the GC.

    so there is no solution.

    What we did is created a EXE instead of a DLL. and changed the memory management scenario of the Framework.
    now its running fine so

    whoever has this error should try other way round.

    Thanks,
    Sachin kale

    C# Develper
    • Marked as answer by Sachin kale Thursday, November 12, 2009 10:39 AM
    Thursday, November 12, 2009 10:38 AM

All replies

  • Hi Sachin kale,

    If you just want to suppress "NotSupportedException" exception, we can handle it in main entrance, since we don't know where the exception throws. Please try it.


            static void Main()

            {

                try

                {

                    Application.Run(new Form1());

                }

                catch (Exception ex)

                {

                    MessageBox.Show("Need to create Pdf Again");

                }

            }



    If you want the application runs regardless of the exception, you have to know where the exception throws.


    Best regards,
    Guang-Ming Bian - MSFT
    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Monday, November 2, 2009 8:25 AM
  • I have tried this..but no use..
    Any thing else which with i can work.

    Thanks for the reply..though..
    Sachin


    C# Develper
    Tuesday, November 3, 2009 5:38 AM
  • In our organisation it is found out that

     NotSupportedException : Manifests itself in low memory situations due to (suspect) an issue/bug in the GC.

    so there is no solution.

    What we did is created a EXE instead of a DLL. and changed the memory management scenario of the Framework.
    now its running fine so

    whoever has this error should try other way round.

    Thanks,
    Sachin kale

    C# Develper
    • Marked as answer by Sachin kale Thursday, November 12, 2009 10:39 AM
    Thursday, November 12, 2009 10:38 AM