ruby中rescue错误异常捕获代码
代码语言:ruby
所属分类:其他
代码描述:ruby中rescue错误异常捕获代码,通过raise抛出异常错误
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
begin puts 'I am before the raise.' raise 'An error has occurred.' puts 'I am after the raise.' rescue puts 'I am rescued.' end puts 'I am after the begin block.' .........完整代码请登录后点击上方下载按钮下载查看
网友评论0