Displaying 20 results from an estimated 500 matches similar to: "Hook into Exception Chain"
2006 Apr 11
2
using log4r and rails
hey everyone. i know somebody else had started a thread on this subject,
but since no one seems to be answering that thread i thought i would
start one of my one.
i''m doing a project for a client and we need some seriously verbose
logging. it looks like log4r can do what i need, but i can''t for the
life of me figure out how to plug it into rails. everywhere talks about
how
2010 May 28
1
Does Sweave run in the global environment ?
Hello
It seems that sweave always runs in the global environment. I want to
run sweave from within a function, and pass a variable into sweave,
however when I do this, sweave doesn't see the variable.
Here's my example test_sweave.Rnw file
|%
\documentclass[a4paper]{article}
\usepackage[OT1]{fontenc}
\usepackage{Sweave}
\begin{document}
\title{Test Sweave Document}
\author{Paul
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 =>
2006 Apr 07
3
log4r and rails
Hey there folks. I would really like to use log4r as my default logger
in Rails, but I''m having a hard time getting it to work. I''m not even
sure I''m plugging it in in the right place. I''m using log4r 1.0.5 and
rails 1.1.1.
I would love it if someone could either point me to a good tutorial on
how to use log4r with rails, or at least point me in the right
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
2012 Jun 27
2
a problem of approach
Dear R-help list,
Part of a program I wrote seem to take a significant amount of time,
therefore I am looking for an alternative approach.
In order to explain what is does:
- the input is a sorted vector of integer numbers
- some higher numbers may be derived (using a mathematical formula)
from lower numbers, therefore they should be eliminated
- at the end, the vector should contain only
2006 Jul 12
2
Initializing log4r once
I have a problem init''ing log4r. I have the following initialization
code for log4r:
Configurator[''logpath''] = ''./config'' # was ''./logs''
Configurator.load_xml_file(''config/log4r_config.xml'')
I put it in appliction.rb, but then ofcourse at every request the logger
system will be reinitialized. This causes the
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
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 24
1
problems unpacking log4r
I was just starting to use log4r and everything was going peachy until I
tired to unpack it into my local vendor/gems. The next time I tried to
load my rails environment, I got:
config.gem: Unpacked gem log4r-1.1.2 in vendor/gems has no specification
file. Run ''rake gems:refresh_specs'' to fix this
and:
no such file to load -- log4r
So - I dutifully tried running rake
2011 Jun 28
2
A masked function is a masked function by any other name
Dear all,
It looks like I do not grasp the concept of masked functions enough as
to solve this trivial problem.
The code that replicates the problem (a source code tree that realizes
a R package actually) is under github so one can call it clone it
easily from the command line (though more experienced users will spot
the problem by browsing through the package code):
git clone http://jcborras at
2005 May 08
3
1.0-test69
http://dovecot.org/test/
- Several mbox fixes, upgrade recommended for test68 mbox users
- Possibly fixes some IMAP hangs where Dovecot just stopped replying
- Fixed delay-newmail workaround. It was badly broken before.
And somewhat off topic advertisement:
I got a bit distracted from Dovecot a week ago when a guy started
mailing me about wanting to write an irssi2 client as a project to
2013 Jan 22
2
[LLVMdev] Utility function to identify user defined function
Hi,
I would like to ask if LLVM provides a utility function like 'isMallocCall' to check if the 'call' instruction is calling some 'foo' user defined function?
If there is no such utility function then I am thinking to do this in the following way:
bool testFoo(CallInst *CI) {
Function *Callee = CI->getCalledFunction();
if (Callee->getName() == "foo")
2005 Nov 21
2
Multinomial Nested Logit package in R?
Dear R-Help,
I'm hoping to find a Multinomial Nested Logit package in R. It would
be great to find something analogous to "PROC MDC" in SAS:
> The MDC (Multinomial Discrete Choice) procedure analyzes models
> where the
> choice set consists of multiple alternatives. This procedure
> supports conditional logit,
> mixed logit, heteroscedastic extreme value,
2006 Jul 06
7
REPOST: Musings on Rails and logging philosophies
[OK, since I stupidly posted this over the July 4th week[end] and got no
responses, let''s try it again...]
As a perpetual Rails dabbler, I make an awful lot of typical beginner
mistakes. And the logs are always either too verbose or too sparse to help
me. And it started me thinking.
I came from one of the largest production OLTP systems in the world, and
the one thing that helped
2008 Sep 02
4
Rescue rails errors
Hi all,
Sometime, I get the following error in my application:
ActionController::InvalidAuthenticityToken in
ManageController#site_servers
ActionController::InvalidAuthenticityToken
I tried to put the code in manage controller between begin ... rescue
... end but it didn''t catch the error.
So I tried in the application.rb controller, I put the forgery code
between begin ... rescue ...
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
2005 Mar 04
17
active record logs format
Hi,
I think this has already been asked on the list, but I can''t seem to
be able to find it again:
currently, active record does some weird thing with its sql logs i.e.:
[4;33mSQL (0.000000) [1;37mPRAGMA table_info(map_locations)
how do I remove the "[4;35m"
thx
Jean
2012 Apr 24
2
How do i read the source code of "biplot"?
> biplot
standardGeneric for "biplot" defined from package "stats"
function (x, ...)
standardGeneric("biplot")
<environment: 0x0d4444d8>
Methods may be defined for arguments: x
Use showMethods("biplot") for currently available ones.
>
>
> showMethods("biplot")
Function: biplot (package stats)
x="ANY"
2005 Dec 19
3
tough activerecord problem
I have an application that is using active record outside of rails. the app
works fine w/o the activerecord code, but when I added activerecord to the
mix I started having trouble with constants not being recognized, e.g.:
[echo] 1) Error:
[echo] test_pipeline_cruncher(IntradayCruncher::TestPipelineCruncher):
[echo] NameError: uninitialized constant INFO
[echo]