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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T14:33:01+00:00 2026-06-03T14:33:01+00:00

I am a Java programmer working with C++ code, and need some help with

  • 0

I am a Java programmer working with C++ code, and need some help with exception handling.

I have code in the following structure:

try{
...
}
catch( ... ) 
{
    log("Exception occurred");
}

An exception is occurring, but the try block is really massive and debugging is not an option, so I need to minimally modify the code to give me relevant info on the exception.

So I added the following catch block before the existing catch block (working with my Java knowledge and referring to C++ guides):

catch(exception e)
{
    log(e.what());
}

However, I am still getting the old message – “Exception occurred”. The code in try block contains a lot of low level functions like strncpy, memcpy etc.

Why is this catch block not working as expected? What can I do to get information on the exception that is occurring and on which line, similar to the stack trace that Java so easily gives.

  • 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-03T14:33:03+00:00Added an answer on June 3, 2026 at 2:33 pm

    You will have to debug and determine if the exception is an C++ exception.
    Note that divide by 0 etc are runtime exceptions not supported by C++, so it can be anything literally.

    A catch-all handler will only catch valid C++ exceptions not all exceptions(which can be plenty).

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

Sidebar

Related Questions

I'm currently working on a plug-in for Eclipse that translates some custom Java code
I'm not a Notes programmer, however, for my sins, have been working on some
I'm a beginner java programmer. I'm working on an application that decrypts some data.
I am a Java programmer and was working on a project using Hibernate and
I'm an experienced Java programmer but am looking at some JavaScript/HTML5 stuff for the
I am a fairly novice Java programmer and I am currently working on a
I am working with a programmer who is using Java to create an interface
I became a professional programmer in the era of object oriented code, and have
I am mostly a Java and AS3 programmer but right now I am working
I'm a C/C++/Java programmer working with JavaScript. I'm trying to write a function that

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.