private CDOViewProvider getViewProvider() { try { return (CDOViewProvider)element.createExecutableExtension("class"); //$NON-NLS-1$ } catch (CoreException ex) { throw WrappedException.wrap(ex); } } }
public static RuntimeException wrap(Exception exception) { if (exception instanceof RuntimeException) { return (RuntimeException)exception; } return new WrappedException(exception); }
public static Exception unwrap(Exception exception) { if (exception instanceof WrappedException) { return ((WrappedException)exception).exception(); } return exception; } }
protected void exportAll(final OUT out) throws Exception { try { exportPackages(out); exportBranches(out); exportLobs(out); exportCommits(out); } catch (WrappedException ex) { throw WrappedException.unwrap(ex); } }
Exception unwrapped = WrappedException.unwrap(ex); if (unwrapped instanceof IOException)
protected MessageDigest createDigest() { try { return MessageDigest.getInstance("SHA-1"); } catch (NoSuchAlgorithmException ex) { throw WrappedException.wrap(ex); } }
/** * @since 3.1 */ public static RuntimeException wrap(Exception exception, String message) { return new WrappedException(message, exception); }
@Override public URI toURI() { try { return new URI(CDOWorkspaceFileSystem.SCHEME + "://" + name); } catch (URISyntaxException ex) { throw WrappedException.wrap(ex); } }
private CDOViewProvider getViewProvider() { try { return (CDOViewProvider)element.createExecutableExtension("class"); //$NON-NLS-1$ } catch (CoreException ex) { throw WrappedException.wrap(ex); } } }
@Override public void close() throws IOException { super.close(); try { latch.await(); } catch (InterruptedException ex) { throw WrappedException.wrap(ex); } }
public static Object getValue(Field field, Object target) { if (!field.isAccessible()) { field.setAccessible(true); } try { return field.get(target); } catch (Exception ex) { throw WrappedException.wrap(ex); } }
public static void setValue(Field field, Object target, Object value) { if (!field.isAccessible()) { field.setAccessible(true); } try { field.set(target, value); } catch (Exception ex) { throw WrappedException.wrap(ex); } }
public void handleBranch(CDOBranch branch) { try { exportBranch(out, branch); } catch (Exception ex) { throw WrappedException.wrap(ex); } } });
public void acquireAtomicRequestLock(Object key) { try { lockManager.lock(LockType.WRITE, key, this, IRWLockManager.WAIT); } catch (InterruptedException ex) { throw WrappedException.wrap(ex); } }
public OutputStream handleBlob(byte[] id, long size) { try { return startBlob(out, id, size); } catch (Exception ex) { throw WrappedException.wrap(ex); } }
public void acquireAtomicRequestLock(Object key) { try { lockManager.lock(LockType.WRITE, key, this, IRWLockManager.WAIT); } catch (InterruptedException ex) { throw WrappedException.wrap(ex); } }
public static void setSessionDescription(IProject project, String value) { try { project.setPersistentProperty(SESSION_DESCRIPTION_KEY, value); } catch (Exception ex) { throw WrappedException.wrap(ex); } }
private CDOWorkspace openWorkspace() { try { return CDOFS.open(name, location); } catch (Exception ex) { throw WrappedException.wrap(ex); } }
public Writer handleClob(byte[] id, long size) { try { return startClob(out, id, size); } catch (Exception ex) { throw WrappedException.wrap(ex); } } });
public void handleCommitInfo(CDOCommitInfo commitInfo) { try { exportCommit(out, commitInfo); } catch (Exception ex) { throw WrappedException.wrap(ex); } } });