com.mchange.v2.resourcepool.ResourcePoolUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of org.apache.servicemix.bundles.c3p0
Show all versions of org.apache.servicemix.bundles.c3p0
This OSGi bundle wraps ${pkgArtifactId} ${pkgVersion} jar file.
package com.mchange.v2.resourcepool;
import com.mchange.v2.log.*;
final class ResourcePoolUtils
{
final static MLogger logger = MLog.getLogger( ResourcePoolUtils.class );
final static ResourcePoolException convertThrowable( String msg, Throwable t )
{
if (Debug.DEBUG)
{
//t.printStackTrace();
if (logger.isLoggable( MLevel.FINE ) )
logger.log( MLevel.FINE , "Converting throwable to ResourcePoolException..." , t );
}
if ( t instanceof ResourcePoolException)
return (ResourcePoolException) t;
else
return new ResourcePoolException( msg, t );
}
final static ResourcePoolException convertThrowable( Throwable t )
{ return convertThrowable("Ouch! " + t.toString(), t ); }
}