Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[Android] Give the exceptions in compareTo implementations in GameLis…
…tItem and FolderBrowserItem some messages. If the exceptions ever actually get thrown, at least you're given a reason as to why the exception was thrown now. Also changed the exception type to NullPointerException. IllegalArgumentException is intended to be used for validating the parameters in constructors/methods.
  • Loading branch information
lioncash committed Sep 10, 2013
1 parent 4841300 commit ce5f80b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -104,6 +104,6 @@ public int compareTo(FolderBrowserItem other)
if(name != null)
return name.toLowerCase().compareTo(other.getName().toLowerCase());
else
throw new IllegalArgumentException();
throw new NullPointerException("The name of this FolderBrowserItem is null");
}
}
Expand Up @@ -117,7 +117,7 @@ public int compareTo(GameListItem o)
if (name != null)
return name.toLowerCase().compareTo(o.getName().toLowerCase());
else
throw new IllegalArgumentException();
throw new NullPointerException("The name of this GameListItem is null");
}
}

0 comments on commit ce5f80b

Please sign in to comment.