Added README.txt and GPL Header to Source Files
[DHBWCampusApp.git] / app / src / main / java / de / dhbwloe / campusapp / network / XmlRequestHelper.java
index 814650d29d8ddcd39be7a0d864208ad59dddc5a6..c04aa32cd95eb9589c39e9dd4d4d952dde5711cd 100644 (file)
@@ -1,5 +1,19 @@
+/* XmlRequestHelper.java
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
 package de.dhbwloe.campusapp.network;
-
 import android.os.Bundle;
 import android.util.Log;
 
@@ -56,7 +70,7 @@ public abstract class XmlRequestHelper {
                 String error = null;
                 try {
                     error = new String(errorResponse, "US-ASCII");
-                } catch (UnsupportedEncodingException e1) {
+                } catch (Exception e1) {
                 }
                 Log.i("HTTPClient", "  Error: " + statusCode + " - " + error);
                 onXmlRequestFail(statusCode, error);
@@ -93,6 +107,7 @@ public abstract class XmlRequestHelper {
 
         parser.require(XmlPullParser.START_TAG, ns, rootElementName);
         while (parser.next() != XmlPullParser.END_TAG) {
+
             if (parser.getEventType() != XmlPullParser.START_TAG) {
                 continue;
             }