ruby 异常处理 begin rescue end

begin

代码1

rescue

 代码

end

如果执行 代码1 发生异常 则转至 代码2

若正常,则执行完跳出