Fix error raising in message after_receive

This commit is contained in:
Raphael Sofaer 2011-08-11 13:59:31 -07:00
parent 6e0630c43f
commit 3594d3ba8b

View file

@ -1,3 +1,4 @@
class NotVisibleError < RuntimeError; end
class Message < ActiveRecord::Base
include ROXML
@ -63,7 +64,7 @@ class Message < ActiveRecord::Base
vis.save
self
else
raise NotVisibleException("Attempting to access a ConversationVisibility that does not exist!")
raise NotVisibleError.new("User #{user.id} with person #{user.person.id} is not allowed to see conversation #{conversation.id}!")
end
end