When using node_save, how sure can one be that it did what it was supposed to do?
At the moment after any call to node_save I have been checking that the required property did succesfully update. For example:
$node->field_some_field['und'][0] = array('tid' => $some_taxonomy);
node_save($node);
if($node->field_some_field['und'][0]['tid'] == $some_taxonomy) {
return TRUE;
} else {
return FALSE;
}
Is this necessary? Or is there a better way to perform the check?
Edit: As an example, say I want to update a node's taxonomy programatically - it would be useful to know if it worked or not. I think it's just bad in general for things to fail silently.