Skip to content

Report error with custom parameters? #187

@stevenwdv

Description

@stevenwdv

I wanted to make a function that calls the THROW_WIN32 macro because I want to give it a shorter more convenient name that can then also be used with a using statement (related to #186). But then the context information will be incorrect, so I have to pass that around.
Hence my question: is it currently possible to report an error with manually provided parameters, for example:

throwWin32(returnAddr, line, file, func, GetLastError());

We can of course use __R_FN(Throw_Win32)(...);, but using such an internal function seems like asking for trouble, and the signature is dependent on the RESULT_DIAGNOSTICS_LEVEL. Is there another way? If not, should maybe public functions be added that take all context parameters and can be called like this?

I guess that maybe I could just disable extra context because I use CaptureStackBackTrace anyways, but I imagine that I'm not the only one that doesn't like using the macros.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions