List of usage examples for java.lang IllegalStateException addSuppressed
public final synchronized void addSuppressed(Throwable exception)
From source file:org.nuxeo.ecm.core.storage.sql.ra.ConnectionImpl.java
@Override public void close() throws ResourceException { if (managedConnection == null) { IllegalStateException error = new IllegalStateException("connection already closed " + this); error.addSuppressed(closeTrace); throw error; }// w w w. j a v a 2s. c o m try { managedConnection.close(this); } finally { closeTrace = new Throwable("close stack trace"); managedConnection = null; } }