Would it be at all possible to have an AsyncTask in Android which "Throws" things? If I don't @Override the method, it doesn't get called. If I add the "throws" at the end, there are compiler errors. For example, I want to do something like:
class testThrows extends AsyncTask<String,Void,JSONObject> {
   @Override
   protected JSONTokener doInBackground(<String>... arguments) throws JSONException {
      String jsonString = arguments[0];
      JSONTokener json = new JSONTokener(jsonString);
      JSONObject object = json.getJSONObject("test");
      return object;
   }
}
json.getJSONObject throws a JSONException. Is there any way to do this?
 
     
     
    