Skip to content

Commit

Permalink
Localize notice options.
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Wood committed Dec 17, 2014
1 parent d10530a commit 06eac00
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/notice.coffee
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
class Notice
constructor: (@options = {}, config = Honeybadger.configuration) ->
@stack = @options.stack
@generator = @options.generator
@class = @options.name || 'Error'
@message = @options.message || 'No message provided'
constructor: (opts = {}, config = Honeybadger.configuration) ->
@stack = opts.stack
@generator = opts.generator
@class = opts.name || 'Error'
@message = opts.message || 'No message provided'
@source = null
@url = document.URL
@project_root = config.project_root
@environment = config.environment
@component = @options.component || config.component
@action = @options.action || config.action
@component = opts.component || config.component
@action = opts.action || config.action
@cgi_data = @_cgiData()
@fingerprint = @options.fingerprint
@fingerprint = opts.fingerprint

@context = {}
for k,v of Honeybadger.context
@context[k] = v
if @options.context && typeof(@options.context) == 'object'
for k,v of @options.context
if opts.context && typeof(opts.context) == 'object'
for k,v of opts.context
@context[k] = v

payload: ->
Expand Down

0 comments on commit 06eac00

Please sign in to comment.