Code example for JsonSyntaxException

Methods: toString

0
//    		ProductKing prodKing = gson.fromJson(reader, ProductKing.class); //Product.class 
    	} 
    	catch (JsonSyntaxException e) {
//    		setIsLoaded(false); 
//    		failed = true; 
			System.out.println("JSON Syntax Exception" + e.toString());
			Toast toast = Toast.makeText(getAct(), "JSON Syntax Exception!", Toast.LENGTH_LONG);
			toast.show();
    	} 
    	catch (Exception e)	{
//    		failed = true; 
//    		setIsLoaded(true); 
    		System.out.println("Exception " + e.toString());
    		Toast toast = Toast.makeText(getAct(), "Exception!", Toast.LENGTH_LONG);
			toast.show();
    	} 
		System.out.println("Name: " + prodKing.getUsername());
		System.out.println("Products: " +prodKing.getProducts().size());
		 
		ProductKing.setStaticProducts(prodKing.getProducts());