Created
July 29, 2016 12:19
-
-
Save npepinpe/1f242dfff8c55d6c6c5bd4da0fddd601 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def context(context) | |
previous_context = self.get_context | |
Thread.current[:__honeybadger_context] = previous_context.respond_to?(:merge) ? previous_context.merge(context) : context | |
yield | |
ensure | |
Thread.current[:__honeybadger_context] = previous_context | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment