Class: RedmineAirbrakeBackend::Error
- Inherits:
-
Object
- Object
- RedmineAirbrakeBackend::Error
- Defined in:
- lib/redmine_airbrake_backend/error.rb
Overview
Error received by airbrake
Direct Known Subclasses
Instance Attribute Summary collapse
-
#application ⇒ Object
readonly
Returns the value of attribute application.
-
#attachments ⇒ Object
readonly
Returns the value of attribute attachments.
-
#backtrace ⇒ Object
readonly
Returns the value of attribute backtrace.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#subject ⇒ Object
readonly
Returns the value of attribute subject.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(data) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(data) ⇒ Error
Returns a new instance of Error.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/redmine_airbrake_backend/error.rb', line 11 def initialize(data) # Type @type = data[:type] # Message @message = data[:message] # Backtrace @backtrace = data[:backtrace].map { |b| BacktraceElement.new(b) } # Error ID @id = generate_id # Subject @subject = generate_subject # Attachments @attachments = (data[:attachments].presence || []).compact # Application @application = data[:application].presence end |
Instance Attribute Details
#application ⇒ Object (readonly)
Returns the value of attribute application.
9 10 11 |
# File 'lib/redmine_airbrake_backend/error.rb', line 9 def application @application end |
#attachments ⇒ Object (readonly)
Returns the value of attribute attachments.
9 10 11 |
# File 'lib/redmine_airbrake_backend/error.rb', line 9 def @attachments end |
#backtrace ⇒ Object (readonly)
Returns the value of attribute backtrace.
8 9 10 |
# File 'lib/redmine_airbrake_backend/error.rb', line 8 def backtrace @backtrace end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
9 10 11 |
# File 'lib/redmine_airbrake_backend/error.rb', line 9 def id @id end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
8 9 10 |
# File 'lib/redmine_airbrake_backend/error.rb', line 8 def @message end |
#subject ⇒ Object (readonly)
Returns the value of attribute subject.
9 10 11 |
# File 'lib/redmine_airbrake_backend/error.rb', line 9 def subject @subject end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
8 9 10 |
# File 'lib/redmine_airbrake_backend/error.rb', line 8 def type @type end |