PDA

View Full Version : get java stacktrace out of string


Ferenc
08-06-2008, 01:38 PM
I want to wrap a div around a java stacktrace output, somebody any idea how to achieve this?


I'm a client and I never gonna use attachments bla bla,

De 500 melding:
biz.domain.ManagerException: Failed to save ContentElement
at
biz.domain.content.managers.ContentElementManager.save(ContentElementManager.java:150)
at
biz.domain.content.struts.admin.nodes.DossierActions.save(DossierActions.java:400)
at sun.reflect.GeneratedMethodAccessor7306.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at

lot more

org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:876)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)

Kor
08-06-2008, 01:42 PM
Java and Javascript are different languages. It is weird that a Java coder, as you seem to be, has not found out that difference so far. I'll move this thread to the Java Forum.

Ferenc
08-06-2008, 01:59 PM
This thread is about javascript, I want to do this in the fronted ! (firefox extension)

Kor
08-06-2008, 03:12 PM
This thread is about javascript, I want to do this in the fronted ! (firefox extension)
If so, maybe you should not have used a Java example of what you need, as there is no similarity between Java and Javascript (except the brand name and some syntax pale resemblances)

Can you tell us what in fact is your aim? In simple words, first.

Ferenc
08-06-2008, 03:50 PM
I got a piece of text wich has a Java-stacktrace
so I need a regulair expression so I can add a <div> arround it.

shyam
08-10-2008, 06:53 PM
t.replace(/((\w+\.)+\w+Exception:(.|\n)*\))/, '<div>$1</div>')