title: How to throw exception in jenkins pipeline?
body: <p>I have handled the Jenkins pipeline steps with try catch blocks. I want to throw an exception manually for some cases. but it shows the below error.</p>
  
  <pre><code>org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use new java.io.IOException java.lang.String
  </code></pre>
  
  <p>I checked the scriptApproval section and there is no pending approvals.</p>