Code example for JsonSyntaxException

Methods: getCause

0
foursquarePlaces = gson.fromJson( response, FoursquareSearchResult.class );
    } 
    catch ( JsonSyntaxException ex )
    { 
      Log.e( FoursquareService.class.getName(), ex.getCause() + " : " + ex.getLocalizedMessage() );
    } 
    return foursquarePlaces;
  } 
 
  private static String search( String getURL )
  { 
    String response = "";
    try 
    { 
 
      Log.d( TAG, getURL );
      HttpClient client = new DefaultHttpClient();
      HttpGet get = new HttpGet( getURL );
      HttpResponse responseGet = client.execute( get );
Connect your IDE to all the code out there  Get Codota for Java