函数封装,wrapper error handling function
一般调用函数都会涉及到返回值的检查处理,所以可以考虑使用一种方法来封装原函数,默认包含了错误处理。
这样,封装的函数中,得到的值是需要的值时,就直接返回该值,如果不是,则调用相关的错误处理函数进行处理。
电子邮件地址不会被公开。 必填项已被标记为 *
名称 *
电子邮件 *
网站
评论
您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Notify me of followup comments via e-mail. You can also subscribe without commenting.
A man is not old until regrets take the place of dreams.