lib/wod/command.rb in wod-0.0.2 vs lib/wod/command.rb in wod-0.0.3
- old
+ new
@@ -21,12 +21,17 @@
STDERR.puts "Authentication failure"
run command, args, retries + 1
else
error "Authentication failure"
end
- rescue Wod::NoTeamSelected
- STDERR.puts "No team selected"
- run command, args, retries + 1
+ rescue Exception => e
+ File.open(last_page_file, 'w') do |f|
+ f.chmod(0600)
+ f.puts Client.last_page.page.send(:html_body)
+ end
+ puts "Error: Last page saved to #{last_page_file}"
+
+ raise e
end
end
def self.run_internal(command, args, wod=nil)
klass, method = parse command
\ No newline at end of file