Class: Bugloco::Notice
- Inherits:
-
Object
- Object
- Bugloco::Notice
- Defined in:
- lib/bugloco/notice.rb
Constant Summary collapse
- EXCEPTION_REGEX =
/^(?<path>[^:]*):(?<line_number>[0-9]*):in `(?<function_name>[^']*)'$/
- IGNORE_DEFAULT =
['ActiveRecord::RecordNotFound', 'ActionController::RoutingError', 'ActionController::InvalidAuthenticityToken', 'CGI::Session::CookieStore::TamperedWithCookie', 'ActionController::UnknownHttpMethod', 'ActionController::UnknownAction', 'AbstractController::ActionNotFound', 'Mongoid::Errors::DocumentNotFound', 'ActionController::UnknownFormat']
Instance Method Summary collapse
- #ignore? ⇒ Boolean
-
#initialize(exception, options = {}) ⇒ Notice
constructor
A new instance of Notice.
- #proto_message ⇒ Object
- #to_pb ⇒ Object
Constructor Details
#initialize(exception, options = {}) ⇒ Notice
Returns a new instance of Notice.
21 22 23 24 25 26 |
# File 'lib/bugloco/notice.rb', line 21 def initialize(exception, = {}) @exception = exception @options = @rack_env = @options[:rack_env] if @options[:rack_env] @proto_message = nil end |
Instance Method Details
#ignore? ⇒ Boolean
32 33 34 |
# File 'lib/bugloco/notice.rb', line 32 def ignore? IGNORE_DEFAULT.include?(@exception.class.to_s) end |
#proto_message ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/bugloco/notice.rb', line 36 def return @proto_message unless @proto_message.nil? @proto_message = Bugloco::Proto::Notice.new load_company load_project load_info_about_notifier load_request load_running_mode load_server_info load_backtrace load_stack load_custom @proto_message end |
#to_pb ⇒ Object
28 29 30 |
# File 'lib/bugloco/notice.rb', line 28 def to_pb @pb ||= .serialize_to_string end |