Module: SuperExceptionNotifier::CustomExceptionMethods
- Defined in:
- lib/super_exception_notifier/custom_exception_methods.rb
Instance Method Summary collapse
-
#access_denied ⇒ Object
The current user does not have enough privileges to access the requested resource.
-
#corrupt_data ⇒ Object
If your ever at a spot in the code that should never get reached, but corrupt data might get you there anyways then this is for you:.
-
#invalid_method ⇒ Object
Resources that must be requested with a specific HTTP Meethod (GET, PUT, POST, DELETE, AJAX, etc) but are requested otherwise should:.
- #method_disabled ⇒ Object
-
#not_implemented ⇒ Object
Then for things that have never existed or have not for a long time we call not_implemented.
- #page_not_found ⇒ Object
- #record_not_found ⇒ Object
-
#resource_gone ⇒ Object
For a while after disabling a route/URL that had been functional we should set it to resource gone to inform people to remove bookmarks.
Instance Method Details
#access_denied ⇒ Object
The current user does not have enough privileges to access the requested resource
33 34 35 |
# File 'lib/super_exception_notifier/custom_exception_methods.rb', line 33 def access_denied raise AccessDenied end |
#corrupt_data ⇒ Object
If your ever at a spot in the code that should never get reached, but corrupt data might get you there anyways then this is for you:
20 21 22 |
# File 'lib/super_exception_notifier/custom_exception_methods.rb', line 20 def corrupt_data raise CorruptData end |
#invalid_method ⇒ Object
Resources that must be requested with a specific HTTP Meethod (GET, PUT, POST, DELETE, AJAX, etc) but are requested otherwise should:
16 17 18 |
# File 'lib/super_exception_notifier/custom_exception_methods.rb', line 16 def invalid_method raise InvalidMethod end |
#method_disabled ⇒ Object
29 30 31 |
# File 'lib/super_exception_notifier/custom_exception_methods.rb', line 29 def method_disabled raise MethodDisabled end |
#not_implemented ⇒ Object
Then for things that have never existed or have not for a long time we call not_implemented
12 13 14 |
# File 'lib/super_exception_notifier/custom_exception_methods.rb', line 12 def not_implemented raise NotImplemented end |
#page_not_found ⇒ Object
23 24 25 |
# File 'lib/super_exception_notifier/custom_exception_methods.rb', line 23 def page_not_found raise PageNotFound end |
#record_not_found ⇒ Object
26 27 28 |
# File 'lib/super_exception_notifier/custom_exception_methods.rb', line 26 def record_not_found raise ActiveRecord::RecordNotFound end |
#resource_gone ⇒ Object
For a while after disabling a route/URL that had been functional we should set it to resource gone to inform people to remove bookmarks.
8 9 10 |
# File 'lib/super_exception_notifier/custom_exception_methods.rb', line 8 def resource_gone raise ResourceGone end |