/**
 * Copyright (C) 2013 Alexander Szczuczko
 *
 * This file may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
package ca.szc.keratin.core.net;

import org.pmw.tinylog.Logger;

import net.engio.mbassy.IPublicationErrorHandler;
import net.engio.mbassy.PublicationError;

/**
 * Logs PublicationErrors at error level
 */
public class BusErrorHandler
    implements IPublicationErrorHandler
{

    @Override
    public void handleError( PublicationError error )
    {
        Logger.error( error.toString() );
    }

}

@@ -564,13 +564,325 @@
  );%0A    
+    logAllSubCauses( error.getCause() );%0A%0A    %7D%0A%0A    private void logAllSubCauses( Throwable cause )%0A    %7B%0A        Throwable subcause = cause.getCause();%0A        if ( subcause != null )%0A        %7B%0A            Logger.error( subcause, %22Subcause of %22 + cause );%0A            logAllSubCauses( subcause );%0A        %7D%0A    
 %7D
-%0A
 %0A%7D%0A

Add recursive logging of causes for the bus error handler.