O'Reilly logo

Contributing to Eclipse: Principles, Patterns, and Plug-Ins by Kent Beck, Erich Gamma

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required