Code example for SQLiteConstraintException

Methods: getMessage

                // code 19: constraint failed" on some Honeycomb and ICS 
                // devices. Bookmark favicons are not a critical feature, so 
                // we can ignore this error for now. bug 711977; bug 712791 
                      String.format("Inserting favicon for \"%s\" failed with SQLiteConstraintException: %s",
                                    uri, e.getMessage()));
    public void updateThumbnailForUrl(ContentResolver cr, String uri,
            BitmapDrawable thumbnail) {
        Bitmap bitmap = thumbnail.getBitmap();
        ContentValues values = new ContentValues();
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        bitmap.compress(Bitmap.CompressFormat.PNG, 0, bos);
        values.put(URL_COLUMN_THUMBNAIL, bos.toByteArray());
        values.put(Browser.BookmarkColumns.URL, uri);