Skip to content

Instantly share code, notes, and snippets.

@mrvdb
Created October 20, 2013 15:49
Show Gist options
  • Save mrvdb/7071328 to your computer and use it in GitHub Desktop.
Save mrvdb/7071328 to your computer and use it in GitHub Desktop.
@@ -186,6 +186,7 @@ function initConversation()
// @fixme db_dataobject won't save our value for an autoincrement
// so we're bypassing the insert wrappers
+ try {
$conv = new Conversation();
$sql = "insert into conversation (id,uri,created) values(%d,'%s','%s')";
$sql = sprintf($sql,
@@ -193,6 +194,9 @@ function initConversation()
$conv->escape($uri),
$conv->escape(common_sql_now()));
$conv->query($sql);
+ } catch (Exception $e) {
+ printfnq("\n\tERROR: " . $e->getMessage(). " \n\t/ " . $sql . "\n");
+ }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment