title: How do you handle errors when using a service layer?
body: <p>in my Zend Framework project, I use a Service Layer, however I don't really know where to handle errors.</p>
  
  <p>For example, let's say I've a <code>UserService::updateUser($data);</code></p>
  
  <p>What if I've:</p>
  
  <pre><code>$data = array(
     'userId' =&gt; 2,
     'firstName' =&gt; 'Jane',
     'lastName'  =&gt; 'Doe',
  );
  </code></pre>
  
  <p>And user with id 2 doesn't exist?</p>
  
  <p>Where and how would you handle such errors?</p>