mobi.mtld.da.exception
Class JsonException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by mobi.mtld.da.exception.JsonException
All Implemented Interfaces:
java.io.Serializable

public class JsonException
extends java.lang.Exception

The JsonException is thrown by the Json class or the Api class when there is an error parsing the Json.

Version:
$Id: JsonException.java 2914 2008-05-16 14:35:04Z ahopebailie $
Author:
MTLD (dotMobi)
See Also:
Serialized Form

Field Summary
static int BAD_DATA
          The data stored in the JSON cannot be used to build a valid Device Atlas data tree.
static int FILE_NOT_FOUND_ERROR
          The path to the JSON file that was given cannot be resolved.
static int JSON_VERSION
          The JSON data you are using is to old for this API.
 
Constructor Summary
JsonException(int code, java.lang.String message)
          Constructs a JsonException instance with a code and human-readable message.
 
Method Summary
 java.lang.Throwable getCause()
          Retrieves the throwable, which determines the nature/cause of the exception.
 int getCode()
          Retrieves the exception code, which determines the nature/cause of the exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, 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
 

Field Detail

BAD_DATA

public static int BAD_DATA
The data stored in the JSON cannot be used to build a valid Device Atlas data tree.


JSON_VERSION

public static int JSON_VERSION
The JSON data you are using is to old for this API. Download a more recent version of the data.


FILE_NOT_FOUND_ERROR

public static int FILE_NOT_FOUND_ERROR
The path to the JSON file that was given cannot be resolved. Ensure you have supplied the correct path. Use an absolute pathname where you are unsure of the current working directory.

Constructor Detail

JsonException

public JsonException(int code,
                     java.lang.String message)
Constructs a JsonException instance with a code and human-readable message.

Parameters:
code - This should be a constant from this exception class.
message - Diagnostic message intended for human reading.
Method Detail

getCause

public java.lang.Throwable getCause()
Retrieves the throwable, which determines the nature/cause of the exception.

Overrides:
getCause in class java.lang.Throwable
Returns:
Explanatory code.

getCode

public int getCode()
Retrieves the exception code, which determines the nature/cause of the exception.

Returns:
Explanatory code.


Copyright © 2011 by mTLD Top Level Domain Limited. All rights reserved. Portions copyright © 2008 by Argo Interactive Limited. Portions copyright © 2008 by Nokia Inc. Portions copyright © 2008 by Telecom Italia Mobile S.p.A. Portions copyright © 2008 by Volantis Systems Limited. Portions copyright © 2002-2008 by Andreas Staeding. Portions copyright © 2008 by Zandan.