Chapter 20. Exception Handling

Let's say you create a marvelously successful plug-in. You have thousands—no millions—of satisfied customers. What a disaster!

Why a disaster? Even with test-driven plug-in development some percentage of users will have problems. The more users, the more problems. Pretty soon, support costs will eat you out of house and home.

In this chapter we'll talk about Eclipse features that collectively reduce support costs:

  • Handling Eclipse exceptions

  • Presenting exceptions to the user using an error dialog

  • Logging errors to the Eclipse log

An important rule to improve the serviceability of your plug-ins is a bit of a paradox:

  • RESPONSIBILITY RULEClearly identify your plug-in as the source of problems.

How can telling the user a mistake ...

Get Contributing to Eclipse: Principles, Patterns, and Plug-Ins now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.