Closed tobias-loew closed 3 months ago
Yes, I'm afraid this is too Windows-centric for me. That code is simple enough, but getting a char *
or a wchar_t *
to print using one of those Win32 syscalls is nontrivial in the general case. However, if someone were to submit a PR for this as a new error_handler
option, I would merge it. :)
Got the message :) Which branch against would you like the PR? develop?
Yes! Develop would be great. I'll re-open this, then. Please mention it by number in the PR commit message.
It already works with the error_handler:
Opened a PR https://github.com/tzlaine/parser/pull/156 for this. Now, I would also like to send the trace to the VS-output window. I've already changed the functions in printing.hpp to additionally take an ostream-argument. The question is: what to feed in for that arg from the parser?
I'm not sure if this is too VS-centric, but for non-console applications it would be helpful having a predefined error-handler, that sends the trace-messages to the VS-Output-Window. Here's a link how to wrap a C++ stream around the OutputDebugString-API https://gist.github.com/comargo/f7fe244e539325cef0f66704b58dc35a