Code example for JSONException

Methods: e, getMessage

0
            String response = values.getString("response");
            JSONObject root = new JSONObject(response);
            id = root.getString("id");
            super.onComplete(values);
        } catch (JSONException e) {
            Log.e("mixiAndroidSDKWrapper", e.getMessage(), e);
            alert("Error", "Fetching ID failed. " + e.getMessage());
        } 
    } 
 
    /** 
     * IDを返します. 
     * @return ID 
     */ 
    public String getId() {
        return id;
    } 
 
}