similar to: Exception not caught while in view

Displaying 20 results from an estimated 3000 matches similar to: "Exception not caught while in view"

2009 Apr 03
0
Truncated development log when using rescue_from
I''m noticing that my development.log messages are not showing the usual complete logging per request/response when I am catching exceptions from my controllers using rescue_from. I was wondering if anyone has ever encountered this issue before. I''m using Rails 2.2.2. Processing DomainsController#show to xml (for 127.0.0.1 at 2009-04-03 16:41:38) [GET] Parameters:
2008 Apr 30
7
rescue_from issue with AWS - uninitialized constant
The new rescue_from in edge rails seems to conflict with ActionWebService, which I need for various other purposes. When I define, for example (with AWS gem installed): <b>rescue_from ActionController::RoutingError, :with => :page_not_found</b> I get the exception: <b>uninitialized constant ActionWebService::Dispatcher::ActionController::Base</b> OK, so AWS
2009 Feb 10
2
rescue_from for NoMethodError
Hi everyone, I was just trying to catch some exceptions in my app, for "Record Not Found" I used this in my application.rb file rescue_from ActiveRecord::RecordNotFound, :with => :record_not_found rescue_from ActionController::NoMethodError, :with => :show_error private def record_not_found render :text => "404 Not Found", :status =>
2008 Oct 24
1
rescue_from and assert_raise
Since commit 5e3517ea7b9fbd460f772bffc9212d882011f2bc, rescue_from is now being handled in tests. I''ve been using rescue_from to handle custom exceptions and testing that those exceptions are raised in functional tests with assert_raise. This no longer works now. What''s the proper way to test this now? --~--~---------~--~----~------------~-------~--~----~ You received this
2004 Jul 18
1
Samba 3.0.4-Suse-Package with Suse 9.0
Hello, at a client's site I have to use Suse Linux 9.0 Pro for specific kernel-modules Suse Linux 9.1 does not provide anymore. To get the server up-to-date I took the Samba-rpms from sernet.de and ran a successful "rpm -Uvh". For an application it is necessary to print via the smb-backend of CUPS, I have to get a queue pointing at a printer located at a Win-PC. That printer is
2011 Jan 15
0
Merb exception stack
In this thread: http://www.ruby-forum.com/topic/134298 the poster had a patch to create a stack trace that had "textmate" links it it. He opened a bug report: http://dev.rubyonrails.org/ticket/10401 I can''t find that since dev.rubyonrails.org appears dead. I don''t know if / how the old tickets got moved over to lighthouse. I searched in the new repository but could
2007 Oct 21
7
exact exceptions in rescue_from
rescue_from stores exception class names in a hash table, and associates them with handlers. When an exception is raised there''s a name lookup, and if an entry is found its handler is invoked. In particular rescue_from does not emulate Ruby''s rescue semantics with regard to inheritance. Which is the rationale? Don''t you think taking is_a? and declaration order
2009 Dec 25
18
rescue_from ActionController::RoutingError II
OK ... so I''m not supposed to use it but ... Why doesn''t rescue_from ActionController::RoutingError work witht he code from http://www.rubyplus.org/episodes/20-Extended-RESTful-Authentication-Rails-2-App.html class ApplicationController < ActionController::Base helper :all # include all helpers, all the time # See ActionController::RequestForgeryProtection for details
2008 Aug 21
1
rescue_from failing to rescue [from]
Having some weird failures of rescue_from in all my specs. They still rescue in actual usage, just not in my specs. Made a pastie of the code: http://pastie.org/257399 This is with latest [as of 1:00 PM Eastern time zone] rspec/rspec-rails/edge. Thanks in advance for any replies on this. RSL -- Posted via http://www.ruby-forum.com/.
2008 Aug 01
1
rescue_from ActionController::MethodNotAllowed
Hello, I''m having some trouble handing ActionController::MethodNotAllowed errors. Basically, the following is defined in my controllers, but obviously I''m missing something. Thanks in advance for any light you can shed. - - - - - - - - - - - - - - - - - - - - class UsersController < ApplicationController rescue_from ActionController::MethodNotAllowed, :with =>
2007 May 10
1
dfs/dce and openssh
I searched google and did not find any hits on this being solved. I want to get ssh so I can the dsa/rsa style password it in an environment that uses dfs/dce authentication if that is possible (and it has not already been solved). In other words, I want to be able to log into a host as a dfs/dce user without typing my password. Before I dig into the code and trying to do this, I wanted
2010 Jul 26
2
Exception Pages when behind a proxy
I am not sure if this desired feature or not but when we are behind a local proxy ie. Nginx/Varnish then the new ShowException middleware doesn''t seem to properly detect the remote IP address and it appears as if every browser gets a local error page with a stack trace, etc. I''ve opened up a ticket on the rails bug tracker but I also would like to verify that this is in fact a
2013 Jul 22
0
How to handle exception that is generated in rack middleware before it reach rails app?
I know that we can use config.exception_app to set up custom exception handling and also use rescue_from. However, I have an issue that there is malformed request (testing generated request) that caused Rails Rack middleware to throw an exception when Rack''s parse_query method. Here is the detail of the problem:
2007 Dec 22
8
Rails 2.0 rescue_from
I am trying to use the new Rails 2.0 macro : rescue_from class PostsController < ApplicationController rescue_from ActiveRecord::RecordNotFound, :with => :deny_access ... def show @post = Post.find_by_id(params[:id]) raise ActiveRecord::RecordNotFound if @post.nil? #illegal access ..... end def deny_access respond_to do |format| format.html end end but the
2013 Nov 12
7
Hook into Exception Chain
Hi there, I''m using Log4r in my rails projects. On log.error an email is sent using the EmailOutputter. I know changed the EmailOutputter to include a global var in the subject (MDC) since the subject is normally static. I want to set this var to the exception message, so it is sent as the subject. Can anyone tell me how to do this in rails? Basically: raise e or some other cause
2009 Mar 20
1
bypass_rescue and its inverse
Hey, I''ve just started using rspec-rails 1.2 and the bypass rescue declaration is wonderful - by default I tend to write controller which raise exceptions (in exceptional circumstances), along with before- filters as guard clauses, so being able to switch off rescue from (which I properly spec separately) is a real boon. Such a boon, in fact, that I immediately shoved it into a
2008 Nov 17
2
Can't seem to test http error codes
in application.rb rescue_from ActiveRecord::RecordNotFound { |e| http_status_code (:missing, e) } def http_status_code(status, exception) @exception = exception respond_to do |format| format.html { render :template => "shared/status_# {status.to_s}", :status => status } format.any { head status } end end in a controller project =
2011 Jun 05
1
Cancan redirect back at AccessDenied
Hello I have a rails 3 app and I am trying to implement the redirect back action at access denied for cancan. If I try this in my application_controller: rescue_from CanCan::AccessDenied do |exception| redirect_to :back end It gives the following error: No HTTP_REFERER was set in the request to this action, so redirect_to :back could not be called successfully. If this is a test, make sure
2008 Mar 21
0
Info: _flash.html.erb partial a bad idea
I guess a partial creates a variable by the same name. I wrote a simple partial called _flash.html.erb in which I display the flash errors and warnings. But, inside that partial, flash was defined but set to nil. Renaming the partial to _display_flash.html.erb resolved the issue. HTH pedz -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You
2009 Mar 27
1
Request Profiling on Rails 2.3.2
scripts/performance/request is gone... and the RequestProfiler class is gone from ActionController. Is there a simple way to profile a request? Thanks pedz -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send