title: Magento model delete function
body: <p>I have Model class which extends <strong>Mage_Core_Model_Abstract</strong>. I have a resource which extends <strong>Mage_Core_Model_Mysql4_Abstract</strong>. Now I am deleting from controller with the following code:</p>
  
  <pre><code>public function deleteAction()
  {
      $params = $this-&gt;getRequest()-&gt;getParams();
      $blogpost = $this-&gt;_createModel();
      $blogpost-&gt;setId($params['id']);
      $blogpost-&gt;delete();
      echo 'Post with id ' . $params['id'] . ' is deleted';
  }
  </code></pre>
  
  <p>The problem is there is no error shown when I supply <strong>non existing</strong> ids. What to do ? Do I have to load that id and check whether it exists or not? or should I use the <strong>try/catch</strong>. I used try and catch but did not give any results.</p>