Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8244465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T21:51:34+00:00 2026-06-07T21:51:34+00:00

My first question is who actually prints the prints the stack trace ? Is

  • 0

My first question is who actually prints the prints the stack trace ? Is it the JVM or some other entity? What happens behind the scene when stack trace is printed ? I am looking specifically for an answer that tells me the role of Uncaught exception handlers in printing the stacktrace if there is an application provided UncaughtExceptionhandler.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T21:51:36+00:00Added an answer on June 7, 2026 at 9:51 pm

    Are you talking about uncaught exceptions? If you catch an exception you can print the stack trace yourself using the Throwable.printStackTrace method. If you want to know how exactly it prints the stack trace you can have a look at the source code.

    For uncaught exceptions, the stack trace is printed by the “uncaught exception handler” of the thread where the exception is thrown. If the thread does not have an uncaught exception handler of its own the thread group’s handler is used, which in turn delegates to the parent thread group or to the “default uncaught exception hander.” If there is no parent nor a default handler, this happens:

    Otherwise, this method determines if the Throwable argument is an instance of ThreadDeath. If so, nothing special is done. Otherwise, a message containing the thread’s name, as returned from the thread’s getName method, and a stack backtrace, using the Throwable‘s printStackTrace method, is printed to the standard error stream.

    You can install your own uncaught exception handler using Thread.setUncaughtExceptionHandler. To set a the default uncaught exception handler to catch any uncaught exceptions use Thread.setDefaultUncaughtExceptionHandler

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my first question. Thanks to everyone who contributes to this site, it's
Important: This question isn't actually really an ASP.NET question. Anyone who knows anything about
This is my first question on stackoverflow, hopefully there is someone who can help
Welcome to my first question on stack overflow. I've looked around, and I haven't
First question on Stackoverflow (.Net 2.0): So I am trying to return an XML
First question here: it is a very short yet fundamental thing in Java that
First question from me; I'm currently fixing a graphing service that uses XSLFO to
First question is, given a url to an mp4 video, how can I save
First question here so hello everyone. The requirement I'm working on is a small
(First question related to iPhone development, so apologies for sounding off-track.) I'm creating a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.