Navigation Menu

Skip to content

Commit

Permalink
Use logger.exception instead of manual output of backtraces
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 21, 2015
1 parent 2b6334b commit 14d4897
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions lib/droonga/plugins/system/absorb_data.rb
Expand Up @@ -80,17 +80,15 @@ def start
end
rescue Exception => exception
@dumper_error_message = exception.to_s
logger.error("failed to process progress",
:error => exception,
:backtrace => exception.backtrace)
logger.exception("failed to process progress",
exception)
on_finish
end
end
rescue Exception => exception
@dumper_error_message = exception.to_s
logger.error("failed to start dump",
:error => exception,
:backtrace => exception.backtrace)
logger.exception("failed to start dump",
exception)
end

on_finish if @dumper_error_message
Expand Down Expand Up @@ -119,9 +117,8 @@ def on_finish
end
rescue Exception => exception
@dumper_error_message = exception.to_s
logger.error("failed to finish dump",
:error => exception,
:backtrace => exception.backtrace)
logger.exception("failed to finish dump",
exception)
error(error_name, @dumper_error_message)
end
super
Expand Down

0 comments on commit 14d4897

Please sign in to comment.