jwo.landserf.process.gps.garmin
Class PacketNotRecognisedException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by jwo.landserf.process.gps.garmin.PacketNotRecognisedException
All Implemented Interfaces:
Serializable

public class PacketNotRecognisedException
extends RuntimeException

This exception is thrown whenever a method expects one type of packet but receives another. For example, a PositionDataPacket is initialised with the byte array containing time-data. This is a runtime exception because it is assumed that there will, in most cases, be type checking of packets.

Version:
2.3, 15th June, 2004
Author:
Jo Wood, based on the design by Henrik Sorensen (haas@itu.dk).
See Also:
Serialized Form

Constructor Summary
PacketNotRecognisedException(int expected, int actual)
          Creates the exception.
 
Method Summary
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PacketNotRecognisedException

public PacketNotRecognisedException(int expected,
                                    int actual)
Creates the exception.

Parameters:
expected - Type of packet that was expected.
actual - Type of the packet that was actually received.


Copyright Jo Wood, 1996-2009, last modified, 17th April, 2009