Module: Exceptional::Integration

Defined in:
lib/exceptional/integration/tester.rb,
lib/exceptional/integration/alerter.rb

Defined Under Namespace

Classes: ExceptionalTestException

Class Method Summary collapse

Class Method Details

.alert(msg, env = {}) ⇒ Object



6
7
8
# File 'lib/exceptional/integration/alerter.rb', line 6

def self.alert(msg, env={})
  return Exceptional::Remote.error(Exceptional::AlertData.new(Alert.new(msg), "Alert"))
end

.testObject



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/exceptional/integration/tester.rb', line 6

def self.test
  begin
    raise ExceptionalTestException.new, 'Test exception'
  rescue Exception => e
    unless Exceptional::Remote.error(Exceptional::ExceptionData.new(e, "Test Exception"))
      puts "Problem sending exception to Exceptional. Check your API key."
    else
      puts "Test Exception sent. Please login to http://exceptional.io to see it!"
    end
  end
end