Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#7998 - Meaningful Error messages when Bookmark Creation Fails

Attached to Project: Rockbox
Opened by Chris Salch (emeraldd) - Saturday, 20 October 2007, 08:40 GMT+1
Task Type Patches
Category Applications
Status Unconfirmed
Assigned To No-one
Player Type All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Private No

Details

I recently installed Rockbox on my Sansa C250 and attempted to use the bookmarking feature. The current behavior is to do nothing if the creation of a bookmark fails, don't tell the user anything and ignore the input. Because of this lack of meaningful error messages I was beginning to think that bookmark did not function at all. After adding a few error messages to the create bookmark routine, I was able to determine what I had wrong and that there was not bug.

So, to make the next newbie's life a little easier, this patch will add some reasonable error messages to apps/bookmark.c. It is by no means a comprehensive list of possible errors ( there may be a latter version of this ) but it should cover several of the basic conditions that could pop. Hopefully, the messages are descriptive enough to allow the user to determine that they have something wrong and there is nothing wrong with Rockbox.

The patch was generated against revision 15216 of the source. It should only make modifications to apps/bookmark.c and apps/lang/english.lang.
   patch.patch (3.2 KiB)
 bookmark.c        |   19 ++++++++++----
 lang/english.lang |   71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 85 insertions(+), 5 deletions(-)

This task depends upon

Comment by Bertrik Sikken (bertrik) - Saturday, 20 October 2007, 22:54 GMT+1
I agree on the general idea, but I think the messages you propose result in even more confusion.
"Bookmark Real Create Failed!" or "Bad Info Playing!" is still not very clear to me.
Comment by Chris Salch (emeraldd) - Sunday, 21 October 2007, 05:01 GMT+1
Good point, I'll clean those up a bit and resubmit.
Comment by Chris Salch (emeraldd) - Monday, 22 October 2007, 05:20 GMT+1
Ok, try this on for size. The messages should be more helpful, if a little verbose.
   bookmark_messages.patch (4.3 KiB)
 bookmark.c        |   35 +++++++++++++++-------
 lang/english.lang |   84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 108 insertions(+), 11 deletions(-)

Comment by Chris Salch (emeraldd) - Monday, 22 October 2007, 05:21 GMT+1
Whoops, forgot to mention that patch is against revision 15258
Comment by Magnus Holmgren (learman) - Saturday, 27 October 2007, 10:54 GMT+1
While adding a few failure messages would be useful, I think this is a bit too detailed. A few of the messages are for what is essentially defensive programming, i.e., a protection against bugs. As I see it, two messages are enough. One stating that bookmarking failed because the playlist is modified (which is the main reason bookmarking fails), and one generic error message for other failures (possibly with a number code to help debugging, but only if can be easily done).

Loading...