1 begin 2 eval string 3 rescue SyntaxError, NameError => boom 4 print " String doesn't compile: " + boom 5 rescue StandardError => bang 6 print " Error running script: " + bang 7 end