Dali Provisional API
Release 3.2

org.eclipse.jpt.common.utility
Interface ExceptionHandler

All Known Subinterfaces:
MultiThreadedExceptionHandler
All Known Implementing Classes:
ExceptionHandler.Default, ExceptionHandler.Null, ExceptionHandler.Runtime, MultiThreadedExceptionHandler.Default, MultiThreadedExceptionHandler.Null, MultiThreadedExceptionHandler.Runtime

public interface ExceptionHandler

Simple interface for allowing clients to pass an exception handler to a service (e.g. to log the exception). This is particularly helpful if the service executes on another, possibly inaccessible, thread.

Provisional API: This interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.


Nested Class Summary
static class ExceptionHandler.Default
          Singleton implementation of the exception handler interface that, like what happens with an unhandled exception (see ThreadGroup.uncaughtException(Thread, Throwable)), prints the exception's stack trace to the "standard" error output stream.
static class ExceptionHandler.Null
          Singleton implementation of the exception handler interface that does nothing with the exception.
static class ExceptionHandler.Runtime
          Singleton implementation of the exception handler interface that wraps the exception in a runtime exception and throws the runtime exception.
 
Method Summary
 void handleException(Throwable t)
          The specified exception was thrown.
 

Method Detail

handleException

void handleException(Throwable t)
The specified exception was thrown. Handle it appropriately.


Dali Provisional API
Release 3.2

Copyright (c) 2012 Oracle. All rights reserved.