Example usage for org.json JSONException toString

List of usage examples for org.json JSONException toString

Introduction

In this page you can find the example usage for org.json JSONException toString.

Prototype

public String toString() 

Source Link

Document

Returns a short description of this throwable.

Usage

From source file:cz.muni.fi.japanesedictionary.entity.Translation.java

/**
 * Takes json string and parses it list of Russian meanings.
 *
 * @param jsonString - JSON string to be parsed
 *//*  ww  w  .  j  a v  a2s.  com*/
public void parseRussian(String jsonString) {
    if (jsonString == null) {
        return;
    }
    JSONArray language_senses;
    try {
        language_senses = new JSONArray(jsonString);
    } catch (JSONException e) {
        Log.w(LOG_TAG, "getting parseRussian()  initial expression failed: " + e.toString());
        return;
    }

    for (int j = 0; j < language_senses.length(); j++) {
        if (!language_senses.isNull(j)) {
            List<String> sense;
            try {
                sense = parseOneSense(language_senses.getJSONArray(j));
                this.addRussianSense(sense);
            } catch (JSONException e) {
                Log.w(LOG_TAG, "getting parseRussian() expression failed: " + e.toString());
            }
        }
    }
}