Hi, When I called a page, the server choked like frozen. I checked it with ''top'' command and HDD(wa) was 95%. There''s no error or suspicious log. After wasting 2 hours, I found that a partial called it self. In _a.html.erb <%= render :partial => "a" %> Can rails detect such a mistake and stop proceeding and report it? Thanks. Sam -- Posted via http://www.ruby-forum.com/.
On Jun 11, 7:37 pm, Sam Kong <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hi, > > When I called a page, the server choked like frozen. > I checked it with ''top'' command and HDD(wa) was 95%. > There''s no error or suspicious log. > > After wasting 2 hours, I found that a partial called it self. > In _a.html.erb > <%= render :partial => "a" %> > > Can rails detect such a mistake and stop proceeding and report it? >In the absolute is this not the same as trying to solve the halting problem ? (which has been proved to be unsolvable) Fred> Thanks. > > Sam > -- > Posted viahttp://www.ruby-forum.com/.
Every time I''ve done something like that, Rails has pulled me up short with a "stack level too deep" error. That''s usually the only way you can catch these things. Mistakes like this can''t be caught automatically, since a partial calling itself can sometimes be valid (when displaying a tree, for instance). --Matt Jones On Jun 11, 2:37 pm, Sam Kong <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hi, > > When I called a page, the server choked like frozen. > I checked it with ''top'' command and HDD(wa) was 95%. > There''s no error or suspicious log. > > After wasting 2 hours, I found that a partial called it self. > In _a.html.erb > <%= render :partial => "a" %> > > Can rails detect such a mistake and stop proceeding and report it? > > Thanks. > > Sam > -- > Posted viahttp://www.ruby-forum.com/.