论坛首页 Ruby版 rails

请教SomeModel.delete

浏览 709 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
最后更新时间:2007-10-04
Web开发敏捷之道写道
SomeModel.delete(id)
如果id不存在则抛出异常,但我使用此方法的时候,竟然没有发生异常

是什么原因
   
最后更新时间:2007-10-15
确实不会抛出异常,原书是这么写的:
An exception is not thrown if the row doesn't exist prior to the call.
应该是翻译错误。
   
0 请登录后投票
论坛首页 Ruby版 rails

跳转论坛:
JavaEye推荐