title: How to untrap after a trap command
body: <p>I have an error trap as follows:</p>
  
  <pre><code>trap failed ERR
  function failed {
      local r=$?
      set +o errtrace
      set +o xtrace
      echo "###############################################"
      echo "ERROR: Failed to execute"
      echo "###############################################"
      # invokes cleanup
      cleanup
      exit $r
  }
  </code></pre>
  
  <p>There is a part of my code where I do expect an error:</p>
  
  <pre><code>command1
  command2
  command3
  set +e #deactivates error capture
  command4_which_expects_error
  set -e #re-activates error capture
  command5
  </code></pre>
  
  <p>Overall I need to ignore the trap during the execution of <strong>command4_which_expects_error</strong></p>
  
  <p>The <strong>set +e</strong> does not seem to disable the trap. Any other ways to "untrap" and then "re-trap" ?</p>