ezvcard.io.json
Class JCardParseException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by ezvcard.VCardException
                  extended by ezvcard.io.json.JCardParseException
All Implemented Interfaces:
Serializable

public class JCardParseException
extends VCardException

Thrown during the parsing of a jCard, when a jCard is not formatted in the correct way (the JSON syntax is valid, but it's not in the correct jCard format).

Author:
Michael Angstadt
See Also:
Serialized Form

Constructor Summary
JCardParseException(JsonToken expected, JsonToken actual)
          Creates a jCard parse exception.
 
Method Summary
 JsonToken getActualToken()
          Gets the JSON token that was read.
 JsonToken getExpectedToken()
          Gets the JSON token that the parser was expected.
 
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

JCardParseException

public JCardParseException(JsonToken expected,
                           JsonToken actual)
Creates a jCard parse exception.

Parameters:
expected - the JSON token that the parser was expecting
actual - the actual JSON token
Method Detail

getExpectedToken

public JsonToken getExpectedToken()
Gets the JSON token that the parser was expected.

Returns:
the expected token

getActualToken

public JsonToken getActualToken()
Gets the JSON token that was read.

Returns:
the actual token


Copyright © 2012-2014 Michael Angstadt. All Rights Reserved.