Example usage for java.lang IllegalArgumentException printStackTrace

List of usage examples for java.lang IllegalArgumentException printStackTrace

Introduction

In this page you can find the example usage for java.lang IllegalArgumentException printStackTrace.

Prototype

public void printStackTrace() 

Source Link

Document

Prints this throwable and its backtrace to the standard error stream.

Usage

From source file:com.epubtest.hxfy.epubtest.PDFViewPager.java

@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
    try {//from   www  . j a  va 2s.  co  m
        return super.onInterceptTouchEvent(ev);
    } catch (IllegalArgumentException e) {
        e.printStackTrace();
        return false;
    }
}

From source file:com.filemanager.free.ui.views.CustomViewPager.java

@Override
public boolean onInterceptTouchEvent(MotionEvent event) {
    try {//from  w  w  w  .  j a v a2  s .com
        if (this.enabled) {
            return super.onInterceptTouchEvent(event);
        }
    } catch (IllegalArgumentException ex) {
        ex.printStackTrace();
    }

    return false;
}

From source file:org.jreader.reader.Reader.java

private void readRss(InputStream inputStream) throws DataSourceException {
    try {//from   w  w w  .  ja  va2 s.  c  o m
        RssReader reader = new RssReader(inputStream);
        reader.save(subscriber);
    } catch (IllegalArgumentException e) {
        e.printStackTrace();
    } catch (FeedException e) {
        e.printStackTrace();
    }
}

From source file:com.sourcesense.alfresco.opensso.MockAlfrescoApplicationContext.java

@Override
public Object getBean(String name) throws BeansException {
    try {/*from w  w  w .j av  a 2 s  . c om*/
        Class clazz = beans.get(name);
        Object newProxyInstance = Proxy.newProxyInstance(getClassLoader(), new Class[] { clazz },
                new InvocationHandler() {
                    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
                        return null;
                    }
                });
        return newProxyInstance;
    } catch (IllegalArgumentException e) {
        e.printStackTrace();
    }
    return null;
}

From source file:com.liuguangqiang.support.widgets.viewpager.SlowViewPager.java

@Override
public boolean onTouchEvent(MotionEvent ev) {
    try {//from w  w  w . j a  v  a  2s.com
        return super.onTouchEvent(ev);
    } catch (IllegalArgumentException ex) {
        ex.printStackTrace();
    }
    return false;
}

From source file:com.goforer.base.ui.view.SwipeViewPager.java

@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
    float x = ev.getX();
    switch (ev.getAction()) {
    case MotionEvent.ACTION_DOWN:
        mStartDragX = x;//from   ww w. ja v a 2 s  .  c om
        break;
    case MotionEvent.ACTION_MOVE:
        if (mStartDragX < x && getCurrentItem() == 0) {
            mListener.onSwipeOutAtStart();
        } else if (mStartDragX > x && getCurrentItem() == getAdapter().getCount() - 1) {
            mListener.onSwipeOutAtEnd();
        }
        break;
    }
    try {
        return super.onInterceptTouchEvent(ev);
    } catch (IllegalArgumentException e) {
        e.printStackTrace();
        return false;
    }
}

From source file:info.papdt.blacklight.ui.common.HackyViewPager.java

@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
    // Hack: Avoid a crash due to support library's exception
    try {/*from ww w .j av a  2s  .  co m*/
        return super.onInterceptTouchEvent(ev);
    } catch (IllegalArgumentException e) {
        if (DEBUG) {
            e.printStackTrace();
        }
        return false;
    }
}

From source file:de.geeksfactory.opacclient.apis.IOpac.java

static void parseMediaList(List<LentItem> media, Document doc, JSONObject data) {
    if (doc.select("a[name=AUS]").size() == 0)
        return;/*from   www.jav a  2 s  .c  o m*/

    Elements copytrs = doc.select("a[name=AUS] ~ table, a[name=AUS] ~ form table").first().select("tr");
    doc.setBaseUri(data.optString("baseurl"));

    DateTimeFormatter fmt = DateTimeFormat.forPattern("dd.MM.yyyy").withLocale(Locale.GERMAN);

    int trs = copytrs.size();
    if (trs < 2) {
        return;
    }
    assert (trs > 0);

    JSONObject copymap = new JSONObject();
    try {
        if (data.has("accounttable")) {
            copymap = data.getJSONObject("accounttable");
        }
    } catch (JSONException e) {
    }

    Pattern datePattern = Pattern.compile("\\d{2}\\.\\d{2}\\.\\d{4}");
    for (int i = 1; i < trs; i++) {
        Element tr = copytrs.get(i);
        LentItem item = new LentItem();

        if (copymap.optInt("title", 0) >= 0) {
            item.setTitle(tr.child(copymap.optInt("title", 0)).text().trim().replace("\u00a0", ""));
        }
        if (copymap.optInt("author", 1) >= 0) {
            item.setAuthor(tr.child(copymap.optInt("author", 1)).text().trim().replace("\u00a0", ""));
        }
        if (copymap.optInt("format", 2) >= 0) {
            item.setFormat(tr.child(copymap.optInt("format", 2)).text().trim().replace("\u00a0", ""));
        }
        int prolongCount = 0;
        if (copymap.optInt("prolongcount", 3) >= 0) {
            prolongCount = Integer
                    .parseInt(tr.child(copymap.optInt("prolongcount", 3)).text().trim().replace("\u00a0", ""));
            item.setStatus(String.valueOf(prolongCount) + "x verl.");
        }
        if (data.optInt("maxprolongcount", -1) != -1) {
            item.setRenewable(prolongCount < data.optInt("maxprolongcount", -1));
        }
        if (copymap.optInt("returndate", 4) >= 0) {
            String value = tr.child(copymap.optInt("returndate", 4)).text().trim().replace("\u00a0", "");
            Matcher matcher = datePattern.matcher(value);
            if (matcher.find()) {
                try {
                    item.setDeadline(fmt.parseLocalDate(matcher.group()));
                } catch (IllegalArgumentException e1) {
                    e1.printStackTrace();
                }
            }
        }
        if (copymap.optInt("prolongurl", 5) >= 0) {
            if (tr.children().size() > copymap.optInt("prolongurl", 5)) {
                Element cell = tr.child(copymap.optInt("prolongurl", 5));
                if (cell.select("input[name=MedNrVerlAll]").size() > 0) {
                    // new iOPAC Version 1.45 - checkboxes to prolong multiple items
                    // internal convention: We add "NEW" to the media ID to show that we have
                    // the new iOPAC version
                    Element input = cell.select("input[name=MedNrVerlAll]").first();
                    String value = input.val();
                    item.setProlongData("NEW" + value);
                    item.setId(value.split(";")[0]);
                    if (input.hasAttr("disabled"))
                        item.setRenewable(false);
                } else {
                    // previous versions - link for prolonging on every medium
                    String link = cell.select("a").attr("href");
                    item.setProlongData(link);
                    // find media number with regex
                    Pattern pattern = Pattern.compile("mednr=([^&]*)&");
                    Matcher matcher = pattern.matcher(link);
                    if (matcher.find() && matcher.group() != null)
                        item.setId(matcher.group(1));
                }
            }
        }

        media.add(item);
    }
    assert (media.size() == trs - 1);

}

From source file:Main.java

public void set(Object desObj, Object fieldObj) {
    try {/*from ww w.j av a  2s  . com*/
        field.set(desObj, fieldObj);
    } catch (IllegalArgumentException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } catch (IllegalAccessException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
}

From source file:cn.horry.teaching_information_exchange.widget.MyViewPager.java

@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
    if (!isLocked) {
        try {/*  w w w  .  j  a  v a  2  s.co  m*/
            return super.onInterceptTouchEvent(ev);
        } catch (IllegalArgumentException e) {
            e.printStackTrace();
            return false;
        }
    }
    return false;
}