Yes.


On Thu, May 8, 2014 at 9:53 PM, Nicolas Raoul <notifications@github.com>wrote:

> In src/com/ichi2/anki/AnkiDb.java:
>
> >              cursor = mDatabase.rawQuery(query, null);
> >              String methodName = getCursorMethodName(type.getSimpleName());
> >              while (cursor.moveToNext()) {
> > -                // The magical line. Almost as illegible as python code ;)
> > -                results.add(type.cast(Cursor.class.getMethod(methodName, int.class).invoke(cursor, column)));
> > +                try {
> > +                    // The magical line. Almost as illegible as python code ;)
> > +                    results.add(type.cast(Cursor.class.getMethod(methodName, int.class).invoke(cursor, column)));
> > +                } catch (InvocationTargetException e) {
> > +                    if (cursor.isNull(column)) { // null value encountered
> > +                        Log.w(AnkiDroidApp.TAG, "AnkiDb.queryColumn (column " + column + "): Located null during exception. Attempting to skip null result and continue. Query: " + query);
> > +                        AnkiDroidApp.saveExceptionReportFile(e, "queryColumn_encounteredNull");
> > +                        continue; // attempt to skip this null record
>
> So the behaviour has changed from "fail" to "prepare a report and
> continue", right?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/ankidroid/Anki-Android/pull/341/files#r12464260>
> .
>