lib/yard/handlers/processor.rb in yard-0.4.0 vs lib/yard/handlers/processor.rb in yard-0.5.0

- old
+ new

@@ -61,11 +61,11 @@ # Processes a list of statements by finding handlers to process each # one. # # @param [Array] statements a list of statements - # @return [nil] + # @return [void] def process(statements) statements.each_with_index do |stmt, index| find_handlers(stmt).each do |handler| begin handler.new(self, stmt).process @@ -79,13 +79,12 @@ rescue Parser::UndocumentableError => undocerr log.warn "in #{handler.to_s}: Undocumentable #{undocerr.message}" log.warn "\tin file '#{file}':#{stmt.line}:\n\n" + stmt.show + "\n" rescue => e log.error "Unhandled exception in #{handler.to_s}:" - log.error "#{e.class.class_name}: #{e.message}" log.error " in `#{file}`:#{stmt.line}:\n\n#{stmt.show}\n" - log.error "Stack trace:" + e.backtrace[0..5].map {|x| "\n\t#{x}" }.join + "\n" + log.backtrace(e) end end end end @@ -121,10 +120,10 @@ end # Loads handlers from {#handler_base_namespace}. This ensures that # Ruby1.9 handlers are never loaded into 1.8; also lowers the amount # of modules that are loaded - # @return [nil] + # @return [void] def load_handlers return if @handlers_loaded[parser_type] handler_base_namespace.constants.each {|c| handler_base_namespace.const_get(c) } @handlers_loaded[parser_type] = true end \ No newline at end of file