question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Show more stack trace of CompositeException

See original GitHub issue

This is an example stack trace of a CompositeException:

com.linecorp.armeria.common.util.CompositeException: 2 exceptions occurred. 
	at com.linecorp.armeria.common.stream.AbstractStreamMessage$CloseEvent.notifySubscriber(AbstractStreamMessage.java:273)
	at com.linecorp.armeria.common.stream.DefaultStreamMessage.notifySubscriberOfCloseEvent0(DefaultStreamMessage.java:300)
	at com.linecorp.armeria.common.stream.DefaultStreamMessage.lambda$notifySubscriberOfCloseEvent$3(DefaultStreamMessage.java:294)
	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
	at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:391)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:835)
Caused by: com.linecorp.armeria.common.util.CompositeException$ExceptionOverview: Multiple exceptions (2)
|-- java.util.NoSuchElementException: null
    at java.base/java.util.ArrayDeque.getLast(ArrayDeque.java:413)
|-- com.linecorp.armeria.common.stream.AbortedStreamException: null
    at com.linecorp.armeria.common.stream.AbortedStreamException.get(AbortedStreamException.java:39)

The exceptions in ExceptionOverview just show two lines of stack traces so it’s really hard to get a context what’s going on from it. We might need to increase the lines (20 is sensible default?) and show full stack trace when -Dcom.linecorp.armeria.verboseExceptions=true.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
devdynam0507commented, Jul 15, 2022

I understood correctly! I will start working on this soon

1reaction
minwooxcommented, Jul 15, 2022

allowing the user to set the number of lines that are output?

That’s a good suggestion. 👍 However, I’m a bit reluctant to do that because

  • CompositeException is not something that users create by themselves
  • We need another system property flag to indicate the number of lines which adds another public API that might not be needed.

Therefore, how about just using the verboseExceptions property for now? If there’re demands for the number of lines later, we can add it at that time. 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I increase the number of displayed lines of a Java ...
x more" only appears on a chained exception, and only when the last x lines of the stack trace are already present as...
Read more >
io.reactivex.exceptions.CompositeException.printStackTrace ...
Retrieves the list of exceptions that make up the CompositeException. getRootCause. Returns the root cause of e. If e.getCause() returns null or e,...
Read more >
Solved: vSphere HTML5 web client : Composite Exception on
Complete stack trace is attached. On debug, it appears to be improper target URI being passed in constraint of QuerySpec from the framework...
Read more >
RxJava - Better crash logs or how to always know which of ...
onErrorResumeNext { error: Throwable -> throw CompositeException(error, breadcrumb) } } class BreadcrumbException : Exception().
Read more >
CompositeException | RXJava 2.1.1 - Srcrr
Represents an exception that is a composite of one or more other exceptions. ... The {@link #printStackTrace()} implementation handles the StackTrace in a ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found