Handling unhandled Exception in vsto

Gunjan Arora 41 Reputation points
2022-11-04T13:55:16.017+00:00

Hi All,

How can I handle unhandled exceptions for vsto add in .I want to handle this as my word is crashing if there are unhandled exceptions

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,237 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,484 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. RLWA32 40,286 Reputation points
    2022-11-05T12:59:52.967+00:00

    An exception that propagates out of your code is indicative of an error condition. While using try/catch might prevent the host application from terminating immediately the error condition could still result in problems that manifest in subsequent processing.

    The takeaway is that you probably have some bugs in your code. You need to debug it to determine the cause of the exception and correct the code that caused it to be thrown, or catch it if it is expected.

    0 comments No comments

  2. Gunjan Arora 41 Reputation points
    2022-11-06T07:47:18.267+00:00

    I agree with your thoughts but What i am asking is some COM exceptions which does not occur every time and it's hard to reproduce For that reason I want something which can handle the exception on the application level. Please share your thoughts