diff --git a/app/src/main/java/info/nightscout/androidaps/tabs/TabPageAdapter.java b/app/src/main/java/info/nightscout/androidaps/tabs/TabPageAdapter.java index 8dff2aec93..b5ed76af02 100644 --- a/app/src/main/java/info/nightscout/androidaps/tabs/TabPageAdapter.java +++ b/app/src/main/java/info/nightscout/androidaps/tabs/TabPageAdapter.java @@ -9,8 +9,12 @@ import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentStatePagerAdapter; import android.view.ViewGroup; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import java.util.ArrayList; +import info.nightscout.androidaps.MainActivity; import info.nightscout.androidaps.interfaces.PluginBase; /** @@ -22,6 +26,8 @@ public class TabPageAdapter extends FragmentStatePagerAdapter { Context context; + private static Logger log = LoggerFactory.getLogger(TabPageAdapter.class); + public TabPageAdapter(FragmentManager fm, Context context) { super(fm); this.context = context; @@ -40,6 +46,8 @@ public class TabPageAdapter extends FragmentStatePagerAdapter { super.finishUpdate(container); } catch (NullPointerException nullPointerException){ System.out.println("Catch the NullPointerException in FragmentStatePagerAdapter.finishUpdate"); + } catch (IllegalStateException e){ + log.error(e.getMessage()); } }