aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/rescue.rb
Commit message (Collapse)AuthorAgeFilesLines
* rescue_from accepts :with => lambda { |exception| ... } or a normal block. ↵Jeremy Kemper2007-10-101-4/+7
| | | | | | Closes #9827. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7822 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9 compat, consistent load pathsJeremy Kemper2007-10-021-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Change from InvalidToken to InvalidAuthenticityToken to be more specificDavid Heinemeier Hansson2007-09-241-9/+9
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7623 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Move rescue_action_with_handler from rescue_action to perform_action so it ↵Jeremy Kemper2007-09-241-2/+2
| | | | | | isn't clobbered by test overrides. References #9449, closes #9645. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7618 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Introduce ActionController::Base.rescue_from to declare exception-handling ↵Jeremy Kemper2007-09-231-2/+51
| | | | | | methods. Cleaner style than the case-heavy rescue_action_in_public. Closes #9449. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7597 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Merge csrf_killer plugin into rails. Adds RequestForgeryProtection model ↵Rick Olson2007-09-231-1/+2
| | | | | | that verifies session-specific _tokens for non-GET requests. [Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7592 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Random hits from the style naziDavid Heinemeier Hansson2007-09-091-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7438 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove deprecated functionality from actionpack. Closes #8958 [lifofifo]Michael Koziarski2007-09-031-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7403 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Routing: respond with 405 Method Not Allowed status when the route path ↵Jeremy Kemper2007-05-261-6/+14
| | | | | | matches but the HTTP method does not. Closes #6953. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6862 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Removed breakpointer and Binding.of_caller in favor of relying on ruby-debug ↵David Heinemeier Hansson2007-04-281-24/+0
| | | | | | by Kent Sibilev since the breakpointer has been broken since Ruby 1.8.4 and will not be coming back [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6611 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added .erb and .builder as preferred aliases to the now deprecated .rhtml ↵David Heinemeier Hansson2007-02-201-1/+1
| | | | | | and .rxml extensions [Chad Fowler]. This is done to separate the renderer from the mime type. .erb templates are often used to render emails, atom, csv, whatever. So labeling them .rhtml doesn't make too much sense. The same goes for .rxml, which can be used to build everything from HTML to Atom to whatever. .rhtml and .rxml will continue to work until Rails 3.0, though. So this is a slow phasing out. All generators and examples will start using the new aliases, though. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6178 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* RecordInvalid, RecordNotSaved => 422 Unprocessable Entity, StaleObjectError ↵Jeremy Kemper2007-01-171-1/+3
| | | | | | => 409 Conflict. References #7097. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5966 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improve the documentation for customising your rescue actions. Closes #7041 ↵Michael Koziarski2007-01-151-6/+14
| | | | | | [rsanheim] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5941 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use 400 Bad Request status for unrescued ActiveRecord::RecordInvalid exceptions.Jeremy Kemper2006-12-221-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5771 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Silence log_error deprecation warnings from inspecting deprecated instance ↵Jeremy Kemper2006-12-191-8/+10
| | | | | | variables. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5757 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Unrescued ActiveRecord::RecordNotFound responds with 404 instead of 500.Jeremy Kemper2006-12-081-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5706 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* test controller rescuesJeremy Kemper2006-11-131-62/+84
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5504 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that rescue template path shouldn't be hardcoded, then it's easier to ↵David Heinemeier Hansson2006-10-091-1/+1
| | | | | | hook in your own (closes #6295) [mnaberez] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5243 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed some deprecation warnings in ActionPack [Rick Olson]Rick Olson2006-09-301-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5212 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added proper getters and setters for content type and charset [DHH] Added ↵David Heinemeier Hansson2006-09-171-1/+1
| | | | | | utf-8 as the default charset for all renders. You can change this default using ActionController::Base.default_charset=(encoding) [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5129 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Changed that uncaught exceptions raised any where in the application will ↵David Heinemeier Hansson2006-09-031-4/+7
| | | | | | cause RAILS_ROOT/public/500.html to be read and shown instead of just the static "Application error (Rails)" [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4955 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Tighten rescue clauses. Closes #5985.Jeremy Kemper2006-08-311-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4885 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Deprecate direct usage of @params. Update ActionView::Base for instance var ↵Jeremy Kemper2006-08-071-2/+2
| | | | | | deprecation. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4715 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Replace alias method chaining with Module#alias_method_chain. [Marcel Molina ↵Marcel Molina2006-04-291-2/+1
| | | | | | Jr.] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4312 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Replace Ruby's deprecated append_features in favor of included. [Marcel ↵Marcel Molina2006-04-291-2/+1
| | | | | | Molina Jr.] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4310 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added protection against proxy setups treating requests as local even when ↵David Heinemeier Hansson2006-03-161-1/+1
| | | | | | they're not #3898 [stephen_purcell@yahoo.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3892 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed docs (closes #2468)David Heinemeier Hansson2005-10-261-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2749 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Really fix the syntax error issueDavid Heinemeier Hansson2005-07-281-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1952 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* More fixes, but still brokenDavid Heinemeier Hansson2005-07-271-2/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1948 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixing the fix, but not quiteDavid Heinemeier Hansson2005-07-271-5/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1945 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed broken error handling #1827 [Stefan Kaes]David Heinemeier Hansson2005-07-251-5/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1920 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix rescue handling to erase both render and redirect resultsNicholas Seckar2005-07-141-1/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1827 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added DoubleRenderError exception that'll be raised if render* is called ↵David Heinemeier Hansson2005-05-211-0/+1
| | | | | | twice #518 [Nicholas Seckar]. Fixed exceptions occuring after render has been called #1096 [Nicholas Seckar] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1348 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Tweaked the rescue with breakpoint, still not perfectDavid Heinemeier Hansson2005-03-231-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@986 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Enable diagnostics screen againDavid Heinemeier Hansson2005-02-161-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@638 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* A hopefully more successful attempt at the Routing branch mergeDavid Heinemeier Hansson2005-02-151-3/+15
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@617 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Backed out of routing merge.. investigating missing patchesDavid Heinemeier Hansson2005-02-151-14/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@616 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Merged back the Routing branchDavid Heinemeier Hansson2005-02-151-2/+14
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@614 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed documentation snafus #575, #576, #577, #585David Heinemeier Hansson2005-02-071-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@525 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Updated documentationDavid Heinemeier Hansson2004-12-161-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@194 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added breakpoint retries on rescue screensDavid Heinemeier Hansson2004-12-091-0/+24
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@103 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Syntax errors and other exceptions thrown outside of an action are now ↵David Heinemeier Hansson2004-12-061-2/+8
| | | | | | gracefully handled by the dispatcher git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@51 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Pass on the original exceptionDavid Heinemeier Hansson2004-11-301-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@30 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* InitialDavid Heinemeier Hansson2004-11-241-0/+94
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4 5ecf4fe2-1ee6-0310-87b1-e25e094e27de