[Android] Give the exceptions in compareTo implementations in GameListItem 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.

This commit is contained in:
lioncash 2013-09-10 08:32:11 -04:00
parent 484130049d
commit ce5f80b151
2 changed files with 2 additions and 2 deletions

View File

@ -104,6 +104,6 @@ public final class FolderBrowserItem implements Comparable<FolderBrowserItem>
if(name != null)
return name.toLowerCase().compareTo(other.getName().toLowerCase());
else
throw new IllegalArgumentException();
throw new NullPointerException("The name of this FolderBrowserItem is null");
}
}

View File

@ -117,7 +117,7 @@ public final class GameListItem implements Comparable<GameListItem>
if (name != null)
return name.toLowerCase().compareTo(o.getName().toLowerCase());
else
throw new IllegalArgumentException();
throw new NullPointerException("The name of this GameListItem is null");
}
}