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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T06:44:48+00:00 2026-05-21T06:44:48+00:00

i have a macro for checking and handling errors #define ERROR_IF_ARG(x, y, z, w)\

  • 0

i have a macro for checking and handling errors

#define ERROR_IF_ARG(x, y, z, w)\
    if (x) {\
        printf("\nERROR! {\n\tText : " y "\n\tExpression : (" #x ")\n\tIn file : %s\n\tLine : %d\n\tFunction : %s\n}\n\n", z, __FILE__, __LINE__, __func__);\
        w;\
    }

in code i call

ERROR_IF_ARG(!isOfType(UNI_STRING), "expected 'std::string', found '%s' ", UNITYPE2STR(type), return NULL);

sadly i cannot place breakpoints inside this macro, but is there maybe some way with using #pragma or __ to place a breakpoint mark by code? or else generate and interuption, so i can trace the problem

  • 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-21T06:44:49+00:00Added an answer on May 21, 2026 at 6:44 am

    Obviously you’re running in a debugger if you’re looking to use breakpoints; how about using an assert within the macro?

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

Sidebar

Related Questions

We have a macro for error-checking that goes like this: #define CheckCondition( x )
I have a macro that looks like this: #define coutError if (VERBOSITY_SETTING >= VERBOSITY_ERROR)
I have a file with a bunch of lines. I have recorded a macro
I have written an Excel VBA macro which imports data from a HTML file
I have the following macro: #define IF_TRACE_ENABLED(level) if (IsTraceEnabled(level)) The user code should look
I just started checking out OpenOffice's Macro system. I have 3.2.0 installed but it
I have a macro where I pass in an argument and use that define
I have a macro that might look as follows (from boost log library) #define
We have a macro for signalling errors in a common utilities library that goes
I have a macro and I want it to copy sheet 1 from file

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.