Sunday, 15 August 2010

ruby on rails - pry rescue exit program immediately when error occurs -



ruby on rails - pry rescue exit program immediately when error occurs -

i create script has buggy line intentionally,

and expected pry stop buggy line, didn't.

% rescue rake test:sample (git)-[develop] rake aborted! nameerror: undefined local variable or method `hi' main:object /users/lib/tasks/test.rake:5:in `block (2 levels) in <top (required)>' tasks: top => test:sample (see total trace running task --trace) gem 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 file desc "import user." # http://robots.thoughtbot.com/post/18070048430/anonymizing-customer-company-and-location-data-using namespace :import task :orders => :environment require_relative './parser_v1' require_relative './parser_20120709_20121030'

ruby-on-rails pry

No comments:

Post a Comment