Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 42e14d74 authored by Joe Onorato's avatar Joe Onorato
Browse files

Throw a better error message when the automatic onClick handling doesn't work.

Change-Id: I61729e26f76a2ab8825e892cd6c70c06f0955e4c
parent 08e1f21d
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -2078,8 +2078,14 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
                                        mHandler = getContext().getClass().getMethod(handlerName,
                                                View.class);
                                    } catch (NoSuchMethodException e) {
                                        int id = getId();
                                        String idText = id == NO_ID ? "" : " with id '"
                                                + getContext().getResources().getResourceEntryName(
                                                    id) + "'";
                                        throw new IllegalStateException("Could not find a method " +
                                                handlerName + "(View) in the activity", e);
                                                handlerName + "(View) in the activity "
                                                + getContext().getClass() + " for onClick handler"
                                                + " on view " + View.this.getClass() + idText, e);
                                    }
                                }