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 3964018
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T03:17:02+00:00 2026-05-20T03:17:02+00:00

What happens when we say e.printStackTrace(); ? Here e is any Exception . Does

  • 0

What happens when we say e.printStackTrace();? Here e is any Exception. Does it stop the normal execution and actually remove the activation records from the thread stack to give the stack trace of the exception? Is it a good idea to use it in applications?

  • 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-05-20T03:17:03+00:00Added an answer on May 20, 2026 at 3:17 am

    Does it stop the normal execution

    No.

    and actually remove the activation records from the thread stack to give the stack trace of the exception?

    No.

    The information has already been captured. This happens in the constructors for Throwable ; i.e. when you new an exception, not when you throw it. The Throwable constructor calls the fillInStackTrace() native method which takes a snapshot of the stack and stores the resulting StackTraceElement[] in a private variable that is used later when printing the stack trace.

    (For the record, this is specified in the javadoc for the constructors of Throwable.

    Is it a good idea to use it in applications?

    Well it is rather expensive and can produce a lot of output. But if you need the stack trace for diagnostic purposes … do it.

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

Sidebar

Related Questions

What happens when i say int a = int.Parse(100); is there any boxing/unboxung or
What actually happens when a Byte overflows? Say we have byte byte1 = 150;
What actually happens to the file system when you do a Subclipse Share Project
The getBoundingClientRect() does not work accurately for all cases. It fails when say a
So what really happens when someone say 'new' in PHP I believe in C/Java,
The docs for Uri.LocalPath don't say what happens if you feed it a non
I am coming from a C# background to C++. Say I have a method
Are autoboxing and unboxing actually fancy terms for operator overloading? What happens when we
Lets say I have created a Thread from within a control to monitor for
What happens if I use SHGetFolderPath api call in a 32 bit system with

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.