diff options
author | rhenium <re4k@re4k.info> | 2013-05-30 17:22:55 +0900 |
---|---|---|
committer | rhenium <re4k@re4k.info> | 2013-05-30 17:22:55 +0900 |
commit | 72fb7942e6ea02b7182a3442175332009d1dac14 (patch) | |
tree | 7792addac50616724da96feafe433f9e0536785c /lib/aclog | |
parent | 75e30f750533af57057fd5a9b7f725218f4be7d0 (diff) | |
download | aclog-72fb7942e6ea02b7182a3442175332009d1dac14.tar.gz |
improve error pages
Diffstat (limited to 'lib/aclog')
-rw-r--r-- | lib/aclog/exceptions.rb | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/aclog/exceptions.rb b/lib/aclog/exceptions.rb index befcbde..e9ea212 100644 --- a/lib/aclog/exceptions.rb +++ b/lib/aclog/exceptions.rb @@ -1,11 +1,19 @@ module Aclog module Exceptions + class UserError < StandardError + attr_reader :user + def initialize(user) + @user = user + end + end + class UserNotFound < StandardError; end - class UserNotRegistered < StandardError; end - class UserProtected < StandardError; end class LoginRequired < StandardError; end class TweetNotFound < StandardError; end - class AccountPrivate < StandardError; end class OAuthEchoUnauthorized < StandardError; end + + class UserNotRegistered < UserError; end + class UserProtected < UserError; end + class AccountPrivate < UserError; end end end |