err.println(ex.getNestedException().toString()); else err.println(ex.toString()); } catch (Exception ex) { err.println(ex.toString());
private void shutdownEclipse() { try { Bundle[] bundles = EclipseStarter.getSystemBundleContext().getBundles(); for (Bundle bundle : bundles) { if (bundle.getBundleId() > 0) { String symbolicName = bundle.getSymbolicName(); Version version = bundle.getVersion(); try { bundle.uninstall(); } catch (BundleException e) { LOG.warn("Uninstall bundle {}:{} failed: {}", new Object[] { symbolicName, version, e.toString() }); } } } EclipseStarter.shutdown(); } catch (Exception e) { LOG.warn("shutting down EclipsePlatform failed, will try to shutdown the OSGi way...", e); } }
protected Bundle install(String location, PrintWriter out, PrintWriter err) { try { return getBundleContext().installBundle(location, null); } catch (IllegalStateException ex) { err.println(ex.toString()); } catch (BundleException ex) { if (ex.getNestedException() != null) { err.println(ex.getNestedException().toString()); } else { err.println(ex.toString()); } } catch (Exception ex) { err.println(ex.toString()); } return null; }
err.println(ex.getNestedException().toString()); else err.println(ex.toString()); } catch (Exception ex) { err.println(ex.toString());
err.println(ex.toString());
err.println(ex.toString());
err.println(ex.toString());
f.format("%s%n", ex.toString());
err.println(ex.toString());
err.println(ex.toString());
err.println(ex.toString());
err.println(ex.toString());
err.println(ex.toString());
f.format("%s%n", ex.toString());
f.format("%s%n", ex.toString());
f.format("%s%n", ex.toString());
@Descriptor("update bundle") public String update(@Descriptor("target bundle") Bundle bundle) { if (bundle == null) { return "Must specify a bundle."; } try { bundle.update(); return null; } catch (BundleException ex) { if (ex.getNestedException() != null) { return ex.getNestedException().toString(); } return ex.toString(); } catch (Exception ex) { return ex.toString(); } }
protected Bundle install(String location) { try { return getBundleContext().installBundle(location, null); } catch (BundleException ex) { if (ex.getNestedException() != null) { println(ex.getNestedException().toString()); } else { println(ex.toString()); } } catch (Exception ex) { println(ex.toString()); } return null; } }
protected Bundle install(String location) { try { return getBundleContext().installBundle(location, null); } catch (BundleException ex) { if (ex.getNestedException() != null) { println(ex.getNestedException().toString()); } else { println(ex.toString()); } } catch (Exception ex) { println(ex.toString()); } return null; } }
return ex.toString();