librefm-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Librefm-commits] [1522] use exception


From: Clint Adams
Subject: [Librefm-commits] [1522] use exception
Date: Tue, 12 May 2009 03:17:33 +0000

Revision: 1522
          http://svn.sv.gnu.org/viewvc/?view=rev&root=librefm&revision=1522
Author:   clint
Date:     2009-05-12 03:17:32 +0000 (Tue, 12 May 2009)
Log Message:
-----------
use exception

Modified Paths:
--------------
    trunk/gnukebox/fix-album-art.php

Modified: trunk/gnukebox/fix-album-art.php
===================================================================
--- trunk/gnukebox/fix-album-art.php    2009-05-12 02:46:45 UTC (rev 1521)
+++ trunk/gnukebox/fix-album-art.php    2009-05-12 03:17:32 UTC (rev 1522)
@@ -27,11 +27,12 @@
 require_once('database.php');
 
        $adodb->SetFetchMode(ADODB_FETCH_ASSOC);
+       try {
        $res = $adodb->GetAll("SELECT name, artist_name, image, artwork_license 
FROM Album WHERE artwork_license IS NULL LIMIT 5000");
-
-               if(!$res) {
-                       die("sql error");
-               }
+       }
+       catch (exception $e) {
+               die($e->getMessage());
+       }
                foreach($res as &$row) {
                echo "<img width=50 src=" . 
go_get_album_art($row['artist_name'], $row['name']) ." />&nbsp;";
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]