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

The Archive Base Latest Questions

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

Could you give a bullet list of practical differences/implication? I read relevant MSDN article,

  • 0

Could you give a bullet list of practical differences/implication? I read relevant MSDN article, but my understanding asynchronous exceptions is still a bit hazy.

I am writing a test suite using Boost.Test and my compiler emits a warning that EHa should be enabled:

warning C4535: calling _set_se_translator() requires /EHa

The project itself uses only plain exceptions (from STL) and doesn’t need /EHa switch. Do I have to recompile it with /EHa switch to make the test suite work properly? My feeling is that I need /EHa for the test suit only.

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

    When you use /EHsc, the compiler will only emit code for exception filters when it can detect that the code wrapped in the try {} block might throw a C++ exception. An exception filter ensures that the destructor of any local C++ objects get called when the stack is unwound while handling an exception. It makes RAII work.

    That’s an optimization, space and time for x86 code, space for x64 code. Space because it can omit the exception filter code, which is modest btw. Time because on x86 it can avoid registering the exception filter upon entering the try {} block. Very modest btw. x64 uses a different way to find exception filters, it is table-based.

    The key phrase in the first paragraph is “might throw a C++ exception”. On Windows there are other sources of exceptions. Like the “a” in /EHa, asynchronous exceptions that are raised by the hardware. Things like floating point exceptions, division by zero, and the all-mighty access violation exception. But also notably the kind of exceptions that are raised by code that you might interop with. Like managed code, basically anything that runs in a VM.

    When you want to make your objects safe for these kind of exceptions as well then you’ll need to use /EHa, that tells the compiler to always register the exception filter.

    Beware of a nasty side-effect of /EHa, it makes catch(…) swallow all exceptions. Including the ones you should never catch, like AV and SO. Look at __try/__except and _set_se_translator() if that’s important to you.

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

Sidebar

Related Questions

Could somebody give me a brief overview of the differences between HTTP 1.0 and
Could you give some guidance for good resources (books, online tutorials) about embedded assembly
Could someone give some info regarding the different character sets within visual studio's project
C#: Could anyone give me good example on how anchoring controls at runtime is
Without spending a long time reviewing the boost source code, could someone give me
Could any one give an explanation on how a DHT works? Nothing too heavy,
Could anyone could point me to some code/give me ideas on how to create
Could you, please, give a code snippet showing how to use Lua embedded in
Just wondered if anyone could give me some advice on the best way to
I was hoping someone could give me a hand on how I write this

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.