net.tomp2p.connection
Class PeerException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by net.tomp2p.connection.PeerException
All Implemented Interfaces:
Serializable

public class PeerException
extends Exception

This exception is used internally and passed over to the method exceptionCaught. A PeerException always has a cause

Author:
Thomas Bocek
See Also:
Serialized Form

Nested Class Summary
static class PeerException.AbortCause
          USER_ABORT means that this peer aborts the communication.
 
Constructor Summary
PeerException(PeerException.AbortCause abortCause, String message)
          Specified error with custom message
 
Method Summary
 PeerException.AbortCause getAbortCause()
           
 String toString()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PeerException

public PeerException(PeerException.AbortCause abortCause,
                     String message)
Specified error with custom message

Parameters:
abortCause - either USER_ABORT, PEER_ERROR, PEER_ABORT, or TIMEOUT.
message - Custom message
Method Detail

getAbortCause

public PeerException.AbortCause getAbortCause()
Returns:
The cause of the error.

toString

public String toString()
Overrides:
toString in class Throwable


Copyright © 2013. All Rights Reserved.