private PluginException createChainedException ( String action , Throwable newException , PluginException previousException ) { String msg = action + " event generated an error." ; log . error ( msg , newException ) ; PluginException wrapper = new PluginException ( msg , previousException == null ? newException : previousException , null ) ; wrapper . setStackTrace ( newException . getStackTrace ( ) ) ; return wrapper ; }
Creates a chained exception .