1 22 23 24 package com.mchange.v2.resourcepool; 25 26 import com.mchange.v2.log.*; 27 28 final class ResourcePoolUtils 29 { 30 final static MLogger logger = MLog.getLogger( ResourcePoolUtils.class ); 31 32 final static ResourcePoolException convertThrowable( String msg, Throwable t ) 33 { 34 if (Debug.DEBUG) 35 { 36 if (logger.isLoggable( MLevel.FINE ) ) 38 logger.log( MLevel.FINE , "Converting throwable to ResourcePoolException..." , t ); 39 } 40 if ( t instanceof ResourcePoolException) 41 return (ResourcePoolException) t; 42 else 43 return new ResourcePoolException( msg, t ); 44 } 45 46 final static ResourcePoolException convertThrowable( Throwable t ) 47 { return convertThrowable("Ouch! " + t.toString(), t ); } 48 } 49 | Popular Tags |