Permalink
Browse files

Raising custom exception when trying to push to unknown channel

  • Loading branch information...
afcapel committed Sep 1, 2011
1 parent f7a5650 commit 548665ef07b6d5ab0ea10ad7b119e0e8d63863d8
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/alondra/pushing.rb
View
@@ -1,7 +1,10 @@
module Alondra
+
+ class PushingException < StandardError; end
+
module Pushing
def push(options)
- raise 'You need to specify the channel to push' unless options[:to]
+ raise PushingException.new('You need to specify the channel to push') unless options[:to]
channels = Channel.for(options.delete(:to))
controller = PushController.new(self)

0 comments on commit 548665e

Please sign in to comment.