发生错误时立即撬出救援出口程序

时间:2014-11-09 01:46:07

标签: ruby-on-rails pry

我故意让我的脚本有一些错误的线,

而且我预计撬线会停在越野车上,但它并没有。

% rescue rake test:sample                                                                                                    (git)-[develop]
rake aborted!
NameError: undefined local variable or method `hi' for main:Object
/Users/lib/tasks/test.rake:5:in `block (2 levels) in <top (required)>'
Tasks: TOP => test:sample
(See full trace by running task with --trace)

宝石

pry (0.10.1)
pry-byebug (2.0.0)
pry-doc (0.6.0)
pry-rails (0.3.2)
pry-rescue (1.4.1)
pry-stack_explorer (0.4.9.1)

Rake文件

desc "Import User."
# http://robots.thoughtbot.com/post/18070048430/anonymizing-customer-company-and-location-data-using
namespace :import do
    task :orders => :environment do
      require_relative './parser_v1'
      require_relative './parser_20120709_20121030'

0 个答案:

没有答案