Changeset 4885
- Timestamp:
- 08/31/06 03:16:28 (2 years ago)
- Files:
-
- trunk/actionmailer/CHANGELOG (modified) (1 diff)
- trunk/actionmailer/lib/action_mailer/base.rb (modified) (1 diff)
- trunk/actionpack/CHANGELOG (modified) (1 diff)
- trunk/actionpack/lib/action_controller/caching.rb (modified) (1 diff)
- trunk/actionpack/lib/action_controller/cgi_ext/cgi_methods.rb (modified) (1 diff)
- trunk/actionpack/lib/action_controller/dependencies.rb (modified) (1 diff)
- trunk/actionpack/lib/action_controller/rescue.rb (modified) (1 diff)
- trunk/actionpack/lib/action_view/base.rb (modified) (1 diff)
- trunk/actionpack/lib/action_view/compiled_templates.rb (modified) (1 diff)
- trunk/actionpack/lib/action_view/helpers/debug_helper.rb (modified) (1 diff)
- trunk/actionpack/test/active_record_unit.rb (modified) (3 diffs)
- trunk/actionwebservice/CHANGELOG (modified) (1 diff)
- trunk/actionwebservice/test/abstract_unit.rb (modified) (1 diff)
- trunk/activerecord/CHANGELOG (modified) (1 diff)
- trunk/activesupport/CHANGELOG (modified) (1 diff)
- trunk/activesupport/lib/active_support/dependencies.rb (modified) (2 diffs)
- trunk/activesupport/test/core_ext/exception_test.rb (modified) (1 diff)
- trunk/railties/CHANGELOG (modified) (1 diff)
- trunk/railties/lib/dispatcher.rb (modified) (3 diffs)
- trunk/railties/lib/fcgi_handler.rb (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionmailer/CHANGELOG
r4818 r4885 1 1 *SVN* 2 3 * Tighten rescue clauses. #5985 [james@grayproductions.net] 2 4 3 5 * Automatically included ActionController::UrlWriter, such that URL generation can happen within ActionMailer controllers. [DHH] trunk/actionmailer/lib/action_mailer/base.rb
r4818 r4885 397 397 begin 398 398 send("perform_delivery_#{delivery_method}", mail) if perform_deliveries 399 rescue Object => e399 rescue Exception => e # Net::SMTP errors or sendmail pipe errors 400 400 raise e if raise_delivery_errors 401 401 end trunk/actionpack/CHANGELOG
r4884 r4885 1 1 *SVN* 2 3 * Tighten rescue clauses. #5985 [james@grayproductions.net] 2 4 3 5 * Fix send_data documentation typo. #5982 [brad@madriska.com] trunk/actionpack/lib/action_controller/caching.rb
r4740 r4885 488 488 begin 489 489 File.delete(f) 490 rescue Object=> e490 rescue SystemCallError => e 491 491 # If there's no cache, then there's nothing to complain about 492 492 end trunk/actionpack/lib/action_controller/cgi_ext/cgi_methods.rb
r4866 r4885 56 56 { node.node_name => node } 57 57 end 58 rescue Object => e58 rescue Exception => e # YAML, XML or Ruby code block errors 59 59 { "exception" => "#{e.message} (#{e.class})", "backtrace" => e.backtrace, 60 60 "raw_post_data" => raw_post_data, "format" => mime_type } trunk/actionpack/lib/action_controller/dependencies.rb
r4310 r4885 72 72 rescue LoadError => e 73 73 raise LoadError.new("Missing #{layer} #{dependency}.rb").copy_blame!(e) 74 rescue Object => exception74 rescue Exception => exception # error from loaded file 75 75 exception.blame_file! "=> #{layer} #{dependency}.rb" 76 76 raise trunk/actionpack/lib/action_controller/rescue.rb
r4715 r4885 79 79 begin 80 80 perform_action_without_rescue 81 rescue Object => exception81 rescue Exception => exception # errors from action performed 82 82 if defined?(Breakpoint) && params["BP-RETRY"] 83 83 msg = exception.backtrace.first trunk/actionpack/lib/action_view/base.rb
r4715 r4885 511 511 CompiledTemplates.module_eval(render_source, 'compiled-template', -line_offset) 512 512 end 513 rescue Object =>e513 rescue Exception => e # errors from template code 514 514 if logger 515 515 logger.debug "ERROR: compiling #{render_symbol} RAISED #{e}" trunk/actionpack/lib/action_view/compiled_templates.rb
r4079 r4885 56 56 module_eval(method_def, fake_file_name, initial_line_number) 57 57 @mtimes[full_key(identifier, arg_names)] = Time.now 58 rescue Object =>e58 rescue Exception => e # errors from compiled source 59 59 e.blame_file! identifier 60 60 raise trunk/actionpack/lib/action_view/helpers/debug_helper.rb
r4 r4885 8 8 Marshal::dump(object) 9 9 "<pre class='debug_dump'>#{h(object.to_yaml).gsub(" ", " ")}</pre>" 10 rescue Object => e10 rescue Exception => e # errors from Marshal or YAML 11 11 # Object couldn't be dumped, perhaps because of singleton methods -- this is the fallback 12 12 "<code class='debug_dump'>#{h(object.inspect)}</code>" trunk/actionpack/test/active_record_unit.rb
r4807 r4885 18 18 begin 19 19 PATH_TO_AR = "#{File.dirname(__FILE__)}/../../activerecord/lib" 20 raise "#{PATH_TO_AR} doesn't exist" unless File.directory?(PATH_TO_AR)20 raise LoadError, "#{PATH_TO_AR} doesn't exist" unless File.directory?(PATH_TO_AR) 21 21 $LOAD_PATH.unshift PATH_TO_AR 22 22 require 'active_record' 23 23 require 'active_record/fixtures' 24 24 $stderr.puts 'success' 25 rescue Object=> e25 rescue LoadError => e 26 26 $stderr.print "failed. Skipping Active Record assertion tests: #{e}" 27 27 ActiveRecordTestConnector.able_to_connect = false … … 42 42 self.connected = true 43 43 end 44 rescue Object => e44 rescue Exception => e # errors from ActiveRecord setup 45 45 $stderr.puts "\nSkipping ActiveRecord assertion tests: #{e}" 46 46 #$stderr.puts " #{e.backtrace.join("\n ")}\n" … … 57 57 ActiveRecord::Base.configurations = { 'sqlite3_ar_integration' => connection_options } 58 58 ActiveRecord::Base.connection 59 rescue Object59 rescue Exception # errors from establishing a connection 60 60 $stderr.puts 'SQLite 3 unavailable; falling to SQLite 2.' 61 61 connection_options = {:adapter => 'sqlite', :dbfile => ':memory:'} trunk/actionwebservice/CHANGELOG
r4810 r4885 1 1 *SVN* 2 3 * Tighten rescue clauses. #5985 [james@grayproductions.net] 2 4 3 5 * Fixed XMLRPC multicall when one of the called methods returns a struct object. [Kent Sibilev] trunk/actionwebservice/test/abstract_unit.rb
r4761 r4885 17 17 require "#{PATH_TO_AR}/lib/active_record" unless Object.const_defined?(:ActiveRecord) 18 18 require "#{PATH_TO_AR}/lib/active_record/fixtures" unless Object.const_defined?(:Fixtures) 19 rescue Object=> e19 rescue LoadError => e 20 20 fail "\nFailed to load activerecord: #{e}" 21 21 end trunk/activerecord/CHANGELOG
r4862 r4885 1 1 *SVN* 2 3 * Tighten rescue clauses. #5985 [james@grayproductions.net] 2 4 3 5 * Fix spurious newlines and spaces in AR::Base#to_xml output [Jamis Buck] trunk/activesupport/CHANGELOG
r4868 r4885 1 1 *SVN* 2 3 * Tighten rescue clauses. #5985 [james@grayproductions.net] 2 4 3 5 * Inflections: don't singularize -ies plurals. [foamdino@gmail.com, Mark Van Holstyn] trunk/activesupport/lib/active_support/dependencies.rb
r4837 r4885 342 342 def load(file, *extras) 343 343 super(file, *extras) 344 rescue Object => exception344 rescue Exception => exception # errors from loading file 345 345 exception.blame_file! file 346 346 raise … … 349 349 def require(file, *extras) 350 350 super(file, *extras) 351 rescue Object => exception351 rescue Exception => exception # errors from required file 352 352 exception.blame_file! file 353 353 raise trunk/activesupport/test/core_ext/exception_test.rb
r4595 r4885 5 5 def get_exception(cls = RuntimeError, msg = nil, trace = nil) 6 6 begin raise cls, msg, (trace || caller) 7 rescue Object => e7 rescue Exception => e # passed Exception 8 8 return e 9 9 end trunk/railties/CHANGELOG
r4843 r4885 1 1 *SVN* 2 3 * Tighten rescue clauses. #5985 [james@grayproductions.net] 2 4 3 5 * Cleaning up tests. [Kevin Clark, Jeremy Kemper] trunk/railties/lib/dispatcher.rb
r4760 r4885 41 41 controller.process(request, response).out(output) 42 42 end 43 rescue Object => exception43 rescue Exception => exception # errors from CGI dispatch 44 44 failsafe_response(output, '500 Internal Server Error', exception) do 45 45 controller ||= const_defined?(:ApplicationController) ? ApplicationController : ActionController::Base … … 130 130 def failsafe_response(output, status, exception = nil) 131 131 yield 132 rescue Object132 rescue Exception # errors from executed block 133 133 begin 134 134 output.write "Status: #{status}\r\n" … … 153 153 end 154 154 end 155 rescue Object155 rescue Exception # Logger or IO errors 156 156 end 157 157 end trunk/railties/lib/fcgi_handler.rb
r3618 r4885 77 77 dispatcher_log :info, "terminated by explicit exit" 78 78 79 rescue Object => fcgi_error79 rescue Exception => fcgi_error # FCGI errors 80 80 # retry on errors that would otherwise have terminated the FCGI process, 81 81 # but only if they occur more than 10 seconds apart. … … 98 98 time_str = Time.now.strftime("%d/%b/%Y:%H:%M:%S") 99 99 logger.send(level, "[#{time_str} :: #{$$}] #{msg}") 100 rescue Object => log_error100 rescue Exception => log_error # Logger errors 101 101 STDERR << "Couldn't write to #{@log_file_path.inspect}: #{msg}\n" 102 102 STDERR << " #{log_error.class}: #{log_error.message}\n" … … 149 149 def process_request(cgi) 150 150 Dispatcher.dispatch(cgi) 151 rescue Object => e151 rescue Exception => e # errors from CGI dispatch 152 152 raise if SignalException === e 153 153 dispatcher_error(e)