title: Celery SoftTimeLimitExceeded and TimeLimitExceeded
body: <p>Below is the code from documentation:</p>
  <pre><code>from celery.exceptions import SoftTimeLimitExceeded
  
  @celery.task(soft_time_limit=15, time_limit=20)
  def mytask():
      try:
          return do_work()
      except SoftTimeLimitExceeded:
          cleanup_in_a_hurry()
  </code></pre>
  <p>The question is how celery allows to catch the exception inside the function.
  If it executes <code>my_task</code> and raises <code>SoftTimeLimitExceeded</code>, how is this exception propagates inside the function?</p>
  <p>Also, why it is not possible to catch <code>TimeLimitExceeded</code> inside the function?</p>
  <p>Thank you.</p>