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

  • SEARCH
  • Home
  • 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 3663320
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T01:31:00+00:00 2026-05-19T01:31:00+00:00

How can I hide sensitive details in a java exception? Is it only possible

  • 0

How can I hide sensitive details in a java exception? Is it only possible to do by wrapping the exception with another?

If so, how exactly does this hide the exception because if I put a watch on the exception @ debug time, I’d be able to see all information on the old exception and the one I am wrapping it with, no?

BTW, this is not like ASP.NET where I can call Response.Write(“”) to write a friendly string to the webpage/response stream. This is a java plugin, in a java web-based app (the sort you install with a built-in server).

Thanks

  • 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-19T01:31:01+00:00Added an answer on May 19, 2026 at 1:31 am

    I’m not sure you should rely on any language mechanisms or VM mechanisms for securing sensitive data against this sort of intrusion. If one is using the debugger, they could just put a breakpoint where the exception is generated and see the data.

    The big risk is that an uncaught exception would flow to a point where a production user could see it, or (often just as bad), where it could be stored in a log message. Good examples of this are communicating with a database – many time the entire query is stored logged when there’s any kind of failure (even a simple timeout).

    IMHO, For these reasons, the best course of action might be to not store sensitive data in the new exception to begin with, or to create a new exception at the lowest point where you expect to catch the exception with the sensitive data, and create one that disposes of the old exception and does not provide any sensitive data.

    For instance, if you create an exception in a method that submits a query with sensitive data to the database, do not store the actual query text, or replace the arguments (if possible) with some hash. This way you could find repeat offenders without exposing the data contents.

    If you are using a third-party component that writes data like that to the page outside your control, you might want to reconsider using that plugin in the first place. To the best of my knowledge, if you are in jurisdictions that enforce certain privacy policies, you could still be liable if you use a third-party tool that does not comply with these policies.

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

Sidebar

Related Questions

Is there a control like System.Windows.Controls.GroupBox that can hide its contents and show only
I come from the Java world, where you can hide variables and functions and
google does not make any styles than you can hide etc. perhaps jquery can
How can I hide a menu item under certain conditions in MFC? I'm not
How can I hide parts of a class so that whoever is using the
I have a UIView with a navigation bar. How can I hide the navigation
I need to hide a Windows form from the taskbar but I can't use
I've always been curious to see if I can show, hide or change a
Should I wrap every exception in a more meaningful exception? Wrapping meaning make the
How we can hide a row at specific index of DataGrid in AS3 ?

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.