{"action":"created","issue":{"url":"https://api.github.com/repos/ibc/EventMachine-LE/issues/24","labels_url":"https://api.github.com/repos/ibc/EventMachine-LE/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/ibc/EventMachine-LE/issues/24/comments","events_url":"https://api.github.com/repos/ibc/EventMachine-LE/issues/24/events","html_url":"https://github.com/ibc/EventMachine-LE/issues/24","id":43725341,"number":24,"title":"error_handler not called for deferred errors","user":{"login":"quezacoatl","id":920097,"avatar_url":"https://avatars.githubusercontent.com/u/920097?v=3","gravatar_id":"","url":"https://api.github.com/users/quezacoatl","html_url":"https://github.com/quezacoatl","followers_url":"https://api.github.com/users/quezacoatl/followers","following_url":"https://api.github.com/users/quezacoatl/following{/other_user}","gists_url":"https://api.github.com/users/quezacoatl/gists{/gist_id}","starred_url":"https://api.github.com/users/quezacoatl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quezacoatl/subscriptions","organizations_url":"https://api.github.com/users/quezacoatl/orgs","repos_url":"https://api.github.com/users/quezacoatl/repos","events_url":"https://api.github.com/users/quezacoatl/events{/privacy}","received_events_url":"https://api.github.com/users/quezacoatl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-09-24T06:54:46Z","updated_at":"2015-07-01T13:35:19Z","closed_at":null,"body":"I think the error_handler should be called in the following case:\r\n\r\n```\r\nrequire 'eventmachine-le'\r\n\r\nEM.run do\r\n\r\n  EM.error_handler { |e|\r\n    puts \"Error raised during event loop: #{e.message}\"\r\n  }\r\n\r\n  operation = proc {\r\n    raise 'some error'\r\n  }\r\n\r\n  callback = proc {\r\n    puts 'callback'\r\n  }\r\n\r\n  EM.defer operation, callback\r\nend\r\n```\r\n\r\nOutput is:\r\nem_test.rb:10:in `block (2 levels) in <main>': some error (RuntimeError)\r\n\tfrom /home/quezacoatl/.rvm/gems/ruby-2.1.2/gems/eventmachine-le-1.1.6/lib/eventmachine.rb:1067:in `call'\r\n\tfrom /home/quezacoatl/.rvm/gems/ruby-2.1.2/gems/eventmachine-le-1.1.6/lib/eventmachine.rb:1067:in `block in spawn_threadpool'\r\n\r\nEM-loop is terminated."},"comment":{"url":"https://api.github.com/repos/ibc/EventMachine-LE/issues/comments/117678800","html_url":"https://github.com/ibc/EventMachine-LE/issues/24#issuecomment-117678800","issue_url":"https://api.github.com/repos/ibc/EventMachine-LE/issues/24","id":117678800,"user":{"login":"ibc","id":16191,"avatar_url":"https://avatars.githubusercontent.com/u/16191?v=3","gravatar_id":"","url":"https://api.github.com/users/ibc","html_url":"https://github.com/ibc","followers_url":"https://api.github.com/users/ibc/followers","following_url":"https://api.github.com/users/ibc/following{/other_user}","gists_url":"https://api.github.com/users/ibc/gists{/gist_id}","starred_url":"https://api.github.com/users/ibc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibc/subscriptions","organizations_url":"https://api.github.com/users/ibc/orgs","repos_url":"https://api.github.com/users/ibc/repos","events_url":"https://api.github.com/users/ibc/events{/privacy}","received_events_url":"https://api.github.com/users/ibc/received_events","type":"User","site_admin":false},"created_at":"2015-07-01T13:35:19Z","updated_at":"2015-07-01T13:35:19Z","body":"Indeed."}}