try node_save and catch exception

Public
</> CopyGet raw version
php
  1. try {
  2. node_save($node);
  3. }
  4. catch (Exception $e) {
  5. watchdog('module', 'Error while saving a node. Message: !message', array('!message' => $e->getMessage()), WATCHDOG_ERROR);
  6. }