提交 4185fb1e 编写于 作者: K karmi 提交者: Pratik Naik

Raise LoadError instead of a runtime exception [#1498 state:resolved]

Signed-off-by: NPratik Naik <pratiknaik@gmail.com>
上级 a0bb8bcb
# My app/models dir must be in the load path. # My app/models dir must be in the load path.
require 'engine_model' require 'engine_model'
raise 'missing model from my app/models dir' unless defined?(EngineModel) raise LoadError, 'missing model from my app/models dir' unless defined?(EngineModel)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册