Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.core.runtime
Interface ISafeRunnable

All Known Implementing Classes:
  SafeRunnable

public interface ISafeRunnable

Safe runnables represent blocks of code and associated exception handlers. They are typically used when a plug-in needs to call some untrusted code (e.g., code contributed by another plug-in via an extension).

Clients may implement this interface.

See Also:
  `Platform.run(ISafeRunnable)`

Method Summary
`void` | `handleException(Throwable exception)` Handles an exception thrown by this runnable's `run` method.
`void` | `run()` Runs this runnable.

Method Detail

### handleException

    public void handleException(Throwable exception)

  Handles an exception thrown by this runnable's `run` method. The processing done here should be specific to the particular usecase for this runnable. Generalized exception processing (e.g., logging in the platform's log) is done by the Platform's run mechanism.

  Parameters:
    `exception` - an exception which occurred during processing the body of this runnable (i.e., in `run()`)
  See Also:
    `Platform.run(ISafeRunnable)`

### run

    public void run()
             throws Exception

  Runs this runnable. Any exceptions thrown from this method will be passed to this runnable's `handleException` method.

  Throws:
    `Exception` - if a problem occurred while running this method. The exception will be processed by `handleException`
  See Also:
    `Platform.run(ISafeRunnable)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.