Skip to content

Instantly share code, notes, and snippets.

View ascruggs's full-sized avatar

Aaron Scruggs ascruggs

  • Austin TX
View GitHub Profile
#0 0xb7fb1402 in __kernel_vsyscall ()
#1 0xb7ec1ddb in __read_nocancel () from /lib/i686/nosegneg/libpthread.so.0
#2 0xb61ff1d8 in vio_read () from /usr/lib/mysql/libmysqlclient.so.15
#3 0xb61ff24e in vio_read_buff () from /usr/lib/mysql/libmysqlclient.so.15
#4 0xb620064b in net_realloc () from /usr/lib/mysql/libmysqlclient.so.15
#5 0xb6200a3b in my_net_read () from /usr/lib/mysql/libmysqlclient.so.15
#6 0xb61f9958 in cli_safe_read () from /usr/lib/mysql/libmysqlclient.so.15
#7 0xb61fa965 in unpack_fields () from /usr/lib/mysql/libmysqlclient.so.15
#8 0xb61cde04 in mysql_read_query_result () from /usr/lib/mysql/libmysqlclient.so.15
#9 0xb63325c4 in get_result (obj=3031113140) at mysql.c:1112
def execute(connection)
response = connection.request(method, request_hash)
parse_response(response["result"])
rescue Ymail::YmailApi::YmailJsonClient::MailboxBusy, Ymail::YmailApi::YmailJsonClient::RequestTooLarge => e
execute_each(connection)
end
def execute_each(connection)
response_hash = {}
@requests.each do |request|
#!/bin/bash
IFS=$'\n'
prevLine=
printDir=
for line in `ls -lR $1 |grep "^l\|:$" ` ; do
if [ -z $prevLine ] ; then
prevLine=$line
else
if [ "${prevLine:$((1-2))}" == ":" ] && [ "${line:0:1}" == "l" ]; then
# 1. explicitly assign the exception to a variable
begin
raise "boom"
rescue StandardError => e
puts e.message
end
# 2. use the global variable
begin
begin
raise "boom"
rescue
logger.error($!)
end
begin
raise "boom"
rescue StandardError => e
logger.error(e)
end
threads = []
threads << Thread.new do
begin
raise "boom"
rescue
puts $!
sleep(1)
puts $!
end
#0 0x007611e0 in rb_stack_trace (result=0xbfd493ac, max_depth=64) at perftools.c:87
#1 0x007613af in CpuProfiler::prof_handler (sig=27, signal_ucontext=0xbfd4958c, cpu_profiler=0x76b4e0) at src/profiler.cc:285
#2 0x007622da in ProfileHandler::SignalHandler (sig=27, sinfo=0xbfd4950c, ucontext=0xbfd4958c) at src/profile-handler.cc:450
#3 <signal handler called>
#4 0x08055b78 in catch_timer ()
#5 <signal handler called>
#6 0x0018a606 in memcpy () from /lib/tls/i686/nosegneg/libc.so.6
#7 0x11aebb00 in ?? ()
#8 0x080573fa in stack_extend ()
#9 0x0df18c24 in ?? ()
Processing ChecksController#autonotify (for 66.219.61.62 at 2009-12-14 21:41:16) [GET]
[2009-12-14 21:41:16] [7826] [-628719038] [INFO ] Parameters: {"action"=>"autonotify", "controller"=>"checks"}
[2009-12-14 21:41:18] [7826] [-628719038] [ERROR] NoMethodError: undefined method `[]' for nil:NilClass. {:params=>{"action"=>"autonotify", "controller"=>"checks"}}
/home/rails/otherinbox/releases/20091214175936/lib/modules/graphite_reader.rb:28:in `grab_latest'
/home/rails/otherinbox/releases/20091214175936/app/controllers/checks_controller.rb:100:in `autonotify'
/home/rails/otherinbox/releases/20091214175936/vendor/rails/actionpack/lib/action_controller/base.rb:1253:in `send'
/home/rails/otherinbox/releases/20091214175936/vendor/rails/actionpack/lib/action_controller/base.rb:1253:in `perform_action_without_filters'
/home/rails/otherinbox/releases/20091214175936/vendor/rails/actionpack/lib/action_controller/filters.rb:617:in `call_filters'
/home/rails/otherinbox/releases/20091214175936/vendor/rails/actionpack/li
module YourNamespacedModule
def self.included(klass)
klass.send :extend, ClassMethods
klass.send :include, InstanceMethods
#klass.belongs_to :some_associated_model #an example of how to use with ActiveRecord
klass.send :attr_accessor, :some_accesor_variable
end
module ClassMethods