unwanted logging of custom WrongValueException

asked 2014-02-21 10:53:23 +0800

chillworld gravatar image chillworld flag of Belgium
5367 4 9

updated 2014-02-21 12:20:50 +0800

Hi all,

Now I have made some constraint with java code. Everything works great. There is just one thing that bothers me.

We throw a new WrongValueException(Component comp, String message);

Now in mine logging I can see this and it comes from :


The method of that class :

public void call(Object base, Method method) {
Class<?>[] paramTypes = method.getParameterTypes();
    java.lang.annotation.Annotation[][] parmAnnos = method.getParameterAnnotations();
    Object[] params = new Object[paramTypes.length];
    try {
        for (int i = 0; i < paramTypes.length; i++) {
            params[i] = resolveParameter(parmAnnos[i],paramTypes[i]);
        method.invoke(base, params);
    } catch(InvocationTargetException invokEx){ 
        //Ian YT Tsai (2012.06.20), while InvocationTargetException,
        //using original exception is much meaningful.
        Throwable c = invokEx.getCause();
        if(c == null) c = invokEx;
        _log.error(c);  // line 117.
        throw UiException.Aide.wrap(c);
    } catch (Exception e) {
        throw UiException.Aide.wrap(e);

Now this is for me NOT an error to be logged(user stupidity I don't log), and I don't want a complete stacktrace ruining mine log.

How can I fix this that mine log stays clean?

Greetz chill.

delete flag offensive retag edit

3 Answers

Sort by ยป oldest newest most voted

answered 2014-10-29 12:20:29 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16

PUSH !!!!!

Is there a way to stop the logging for that?

link publish delete flag offensive edit

answered 2014-11-11 21:30:48 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16


link publish delete flag offensive edit

answered 2015-01-04 01:15:05 +0800

snaef999 gravatar image snaef999
6 1

Push again...I wish I had and answer for this also. I need to do some research, but there is something about the Expectable type that may accomplish this.

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

1 follower



Asked: 2014-02-21 10:53:23 +0800

Seen: 22 times

Last updated: Jan 04 '15

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More