I just checked in a fix for this, so that the outer most throwable trace is
the first printed, then the nested is handled.
So continuing with the c, b, a example (run from jython) here is the trace:
org.jboss.util.NestedError: c; - nested throwable:
(org.jboss.util.NestedError: b; - nested
Title: RE: [JBoss-dev] Are we logging the exception enough!!!
Well,
IMHO, we should also find a way to remove all these redundant exceptions! Each
level is printing the same exception, the same stack trace (with just a few line
in less at each step...) When you *really* have more than one
Title: RE: [JBoss-dev] Are we logging the exception enough!!!
Here are the results of your code snippet below in a clean build of jboss. It looks like it's printed in a, b, c order if I go by the line in ApplicationBean that caused each stack trace.
And unless I'm doing something else wrong
Message-
From: Jason Dillon [ mailto:[EMAIL PROTECTED] ]
Sent: Wednesday, April 17, 2002 4:51 PM
To: Casey Haakenson
Cc: [EMAIL PROTECTED]; 'marc fleury'; David
Jencks; Scott M Stark
Subject: Re: [JBoss-dev] Are we logging the exception enough!!!
Ok, do me a favor (cause I am really busy
Title: RE: [JBoss-dev] Are we logging the exception enough!!!
I figured I would run it in container to compare apples to apples, but here it is outside of the container. Source file attached.
-Casey
org.jboss.deployment.DeploymentException: c; - nested throwable
Dillon [ mailto:[EMAIL PROTECTED] ]
Sent: Thursday, April 18, 2002 3:45 PM
To: Casey Haakenson
Cc: [EMAIL PROTECTED]; 'marc fleury'; David
Jencks; Scott M Stark
Subject: Re: [JBoss-dev] Are we logging the exception enough!!!
I was hoping you would do this outside of the container... so we
Title: RE: [JBoss-dev] Are we logging the exception enough!!!
After
taking a look at a specific example of logging too many exceptions and before
moving on, I'd like to get some feedback.
Attached are several patch files (and before/after
exceptions traces), seperated into two sets
The second set of patches is for reformatting of the exception
printing. Dealing with it for a while, I just couldn't handle the way
they were printed anymore so I changed it around a bit. I realize
this is mainly a personal preference, but I thought I'd send it out
for feedback.
Title: RE: [JBoss-dev] Are we logging the exception enough!!!
I attached before and after traces to the original message, but had mistakenly not saved the right after traces (was comparing initial startup and a redployment).
Anyway, here are the right versions.
I'm not trying to show less
I attached before and after traces to the original message, but had
mistakenly not saved the right after traces (was comparing initial
startup and a redployment).
It *looks*, like your before might still have your changes in it... as
it shows the trace for NPE first... but I am not
Ok, do me a favor (cause I am really busy right now). Do something like
this:
snip
Exception a = new DeploymentException(a);
Exception b = new DeploymentException(b, a);
Exception c = new DeploymentException(c, b);
c.printStackTrace();
/snip
Logically the order printed should list the stack
Title: RE: [JBoss-dev] Are we logging the exception enough!!!
I just did a clean checkout, build, and run. It still looks like the before snapshot I sent earlier. Here's an inline copy of the log I just got with the clean build and an excerpt from Scott's original traces that if I read
yeah I have the same gripe :)
marcf
|-Original Message-
|From: [EMAIL PROTECTED]
|[mailto:[EMAIL PROTECTED]]On Behalf Of Scott
|M Stark
|Sent: Tuesday, April 16, 2002 1:23 PM
|To: [EMAIL PROTECTED]
|Subject: [JBoss-dev] Are we logging the exception enough!!!
|
|
|The following exception
Sounds like MainDeployer should be the one to log this exception.
I have noticed that we generally misuse exceptions in many places... ie.
catching exceptions to log, then rethrow, or just to ignore. There are also
places where we wrap exceptions when we could really just add a checked
Naaah... we need to log it several times within the same object!!! Any
exception should fill up your hard drive with the log file!!
I'll take a look at fixing this.
thanks
david jencks
On 2002.04.16 16:22:41 -0400 Scott M Stark wrote:
The following exception is getting logged by the
he he, funny
I want a new developer that wants to get RW and prove he brings something to
take it though. I would formulate the project like jason did and put it on
the website see if someone takes it. (or someone lurking on this list speak
up).
It is big and gives you an overview of many
Title: RE: [JBoss-dev] Are we logging the exception enough!!!
It's funny, I was just emailing David about a good starting point for contributing. Not sure if I have the time or knowledge of the framework, but I'll take a day or two digging around to see if the scope is a good fit for me
Here is the strategy I follow in JBossCMP:
Low-level non recoverable exceptions (SQLException, IOException...) are
wrapped in an EJBException. (Not RemoteException or ServerException as
is required by the spec).
When catching an Exception, first check for EJBException, and just
rethrow.
Sounds very interesting and tempting but how do you propose someone do this without
RW. This will require modifying a multitude of files. If someone does not have RW, the
files will quickly become out of sync. The merge would be a nightmare.
I would think the process would be in 2 steps.
1.
19 matches
Mail list logo