[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Librefm-commits] [1897] better exception behavior
From: |
Clint Adams |
Subject: |
[Librefm-commits] [1897] better exception behavior |
Date: |
Sat, 30 May 2009 00:32:15 +0000 |
Revision: 1897
http://svn.sv.gnu.org/viewvc/?view=rev&root=librefm&revision=1897
Author: clint
Date: 2009-05-30 00:32:14 +0000 (Sat, 30 May 2009)
Log Message:
-----------
better exception behavior
Modified Paths:
--------------
trunk/nixtape/data/User.php
trunk/nixtape/user-recent-tracks.php
Modified: trunk/nixtape/data/User.php
===================================================================
--- trunk/nixtape/data/User.php 2009-05-30 00:27:09 UTC (rev 1896)
+++ trunk/nixtape/data/User.php 2009-05-30 00:32:14 UTC (rev 1897)
@@ -164,7 +164,11 @@
* @return An array of scrobbles with human time
*/
function getScrobbles($number) {
- $data = Server::getRecentScrobbles($number, $this->uniqueid);
+ try {
+ $data = Server::getRecentScrobbles($number,
$this->uniqueid);
+ } catch (exception $e) {
+ throw (new Exception('Breakage while getting recent
scrobbles'));
+ }
if(!isset($data)) { return array(); }
return $data;
}
Modified: trunk/nixtape/user-recent-tracks.php
===================================================================
--- trunk/nixtape/user-recent-tracks.php 2009-05-30 00:27:09 UTC (rev
1896)
+++ trunk/nixtape/user-recent-tracks.php 2009-05-30 00:32:14 UTC (rev
1897)
@@ -43,7 +43,7 @@
$smarty->assign('geo', Server::getLocationDetails($user->location_uri));
try {
- $aUserScrobbles = $user->getScrobbles( $scrobbleCount );
+ $aUserScrobbles = $user->getScrobbles( $scrobbleCount );
$smarty->assign('scrobbles', $aUserScrobbles);
} catch (exception $e) {}
try {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Librefm-commits] [1897] better exception behavior,
Clint Adams <=