forked from GNUsocial/gnu-social
Skip on already-exists error
This commit is contained in:
parent
2c70680b24
commit
f5af67ce68
@ -75,10 +75,17 @@ class DeliciousBookmarkImporter extends QueueHandler
|
|||||||
$data['description'],
|
$data['description'],
|
||||||
array('created' => $data['created'],
|
array('created' => $data['created'],
|
||||||
'distribute' => false));
|
'distribute' => false));
|
||||||
} catch (ClientException $e) {
|
} catch (ClientException $ce) {
|
||||||
// Most likely a duplicate -- continue on with the rest!
|
// 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;
|
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;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user