public final class OfficeUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
stopQuietly(OfficeManager manager)
Stops an
OfficeManager unconditionally. |
public static void stopQuietly(OfficeManager manager)
OfficeManager
unconditionally.
Equivalent to OfficeManager.stop()
, except any exceptions will be ignored. This is
typically used in finally blocks.
Example code:
OfficeManager manager = null; try { manager = LocalOfficeManager().make(); manager.start(); // process manager } catch (Exception e) { // error handling } finally { OfficeUtils.stopQuietly(manager); }
manager
- the manager to stop, may be null or already stopped.