From 59839b7e087505d018be6b3c4d68e3ba076e029c Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 7 Dec 2011 15:13:58 +0300 Subject: [PATCH] webview: try to trap runtimeexception --- src/org/fox/ttrss/ArticleFragment.java | 6 +++++- src/org/fox/ttrss/OfflineArticleFragment.java | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/org/fox/ttrss/ArticleFragment.java b/src/org/fox/ttrss/ArticleFragment.java index 0920b8f8..b3d3349a 100644 --- a/src/org/fox/ttrss/ArticleFragment.java +++ b/src/org/fox/ttrss/ArticleFragment.java @@ -126,7 +126,11 @@ public class ArticleFragment extends Fragment implements OnClickListener { "" + "" + m_article.content + ""; - web.loadDataWithBaseURL(null, content, "text/html", "utf-8", null); + try { + web.loadDataWithBaseURL(null, content, "text/html", "utf-8", null); + } catch (RuntimeException e) { + e.printStackTrace(); + } if (m_onlineServices.isSmallScreen()) web.setOnTouchListener(m_gestureListener); diff --git a/src/org/fox/ttrss/OfflineArticleFragment.java b/src/org/fox/ttrss/OfflineArticleFragment.java index 2469ca51..71cfd9ce 100644 --- a/src/org/fox/ttrss/OfflineArticleFragment.java +++ b/src/org/fox/ttrss/OfflineArticleFragment.java @@ -162,7 +162,11 @@ public class OfflineArticleFragment extends Fragment implements OnClickListener "" + "" + articleContent + ""; - web.loadDataWithBaseURL(null, content, "text/html", "utf-8", null); + try { + web.loadDataWithBaseURL(null, content, "text/html", "utf-8", null); + } catch (RuntimeException e) { + e.printStackTrace(); + } if (m_offlineServices.isSmallScreen()) web.setOnTouchListener(m_gestureListener);