aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/middleware/closed_error.rb
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2011-04-06 12:30:08 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2011-04-06 15:45:23 -0300
commit90ecad0bc944fc3adb847c0c754d8f0dc2bed4b5 (patch)
tree9d4b9a65dcddcaf7581c01f6ccfac271fcba282b /actionpack/lib/action_dispatch/middleware/closed_error.rb
parent2e757bc298cef715e5c56945161bbd84f2610729 (diff)
downloadrails-90ecad0bc944fc3adb847c0c754d8f0dc2bed4b5.tar.gz
rails-90ecad0bc944fc3adb847c0c754d8f0dc2bed4b5.tar.bz2
rails-90ecad0bc944fc3adb847c0c754d8f0dc2bed4b5.zip
Add ClosedError message to the initializer
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware/closed_error.rb')
-rw-r--r--actionpack/lib/action_dispatch/middleware/closed_error.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/closed_error.rb b/actionpack/lib/action_dispatch/middleware/closed_error.rb
new file mode 100644
index 0000000000..0a4db47f4b
--- /dev/null
+++ b/actionpack/lib/action_dispatch/middleware/closed_error.rb
@@ -0,0 +1,7 @@
+module ActionDispatch
+ class ClosedError < StandardError #:nodoc:
+ def initialize(kind)
+ super "Cannot modify #{kind} because it was closed. This means it was already streamed back to the client or converted to HTTP headers."
+ end
+ end
+end