Skip to content

Commit

Permalink
Don't set instance variable on frozen exception
Browse files Browse the repository at this point in the history
  • Loading branch information
shalvah committed Sep 26, 2022
1 parent 87aa50c commit 48fe951
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/honeybadger/agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,10 @@ def notify(exception_or_opts, opts = {})
push(notice)
end

exception_or_opts.instance_variable_set(:@__hb_notice_id, notice.id) if exception_or_opts.is_a?(Exception)
if exception_or_opts.is_a?(Exception)
exception_or_opts.instance_variable_set(:@__hb_notice_id, notice.id) unless exception_or_opts.frozen?
end

notice.id
end

Expand Down

0 comments on commit 48fe951

Please sign in to comment.