git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

Commit f5af67ce authored by Evan Prodromou's avatar Evan Prodromou

Skip on already-exists error

parent 2c70680b
......@@ -75,10 +75,17 @@ class DeliciousBookmarkImporter extends QueueHandler
$data['description'],
array('created' => $data['created'],
'distribute' => false));
} catch (ClientException $e) {
} catch (ClientException $ce) {
// Most likely a duplicate -- continue on with the rest!
common_log(LOG_ERR, "Error importing delicious bookmark to $data[url]: " . $e->getMessage());
common_log(LOG_ERR, "Error importing delicious bookmark to $data[url]: " . $ce->getMessage());
return true;
} catch (Exception $ex) {
if (preg_match("/DB Error: already exists/", $ex->getMessage())) {
common_log(LOG_ERR, "Error importing delicious bookmark to $data[url]: " . $ce->getMessage());
return true;
} else {
throw $ex;
}
}
return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment