title: Catch timeout event in ruby selenium
body: <p>Is there any way to catch all timeout error events in selenium , written in Ruby?</p>
  
  <p>I am writing jenkins with selenium , but not sure the best way to terminate building tasks btw steps . The way I found so far is to put exec("exit 1") inside ruby file. However, I have no idea when to put this command . So , I'd like to catch all timeout error and trigger this event. </p>
  
  <p>If there's any better way , please kindly advise !
  Thanks!</p>