1月 052015
 

上面这样写的try,基本实现了try..catch.. 的功能,但是,如果要在catch中提前return,就不那么方便了,虽然也能做,且看下面这个版本, 我们不妨实现try、try..catch.. 两个函数,需要立即返回的时候,使用try更方便些:

 

 Posted by at 下午 7:04

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

(required)

(required)

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据