New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature : OF_FUNC_NAME #1996
Comments
can you provide a bit more context? i haven't used this strategy before. when is it most useful? |
it basically means you can do something like: void wildClass::doSomethingDangerous() {
if (!trySomethingAndReturnTrueIfSuccessful()) {
ofLogError(OF_FUNC_NAME) << "disaster!";
}
} and you'd get
(can't remember if that's exactly right for oF error output formatting) |
(essentially it makes sense on gcc to just use |
relevant discussion: #985 |
good spot! the 2 issues are compatible (the other could then possible use OF_FUNC_NAME) anybody can see this having enough use to include in core? |
I think it could be useful, and it's pretty simple. Does that warrant inclusion in the core? that's not my call I think. Another point: doesn't |
also, check out https://github.com/gameoverhack/ofxLogger |
I think that could be useful. Another usage example & implementation: https://github.com/damiannz/ofxProfile/blob/master/src/ofxProfile.h |
I have no problem adding this in. |
we should definitely take some wisdom from #985 when we do this, there's lots of groundwork already done, especially in @gameoverhack's ofxLogger. |
something like:
in ofConstants.h
basically so people can get the current function name for errors, etc in a platform agnostic way.
elliot
(Edit : OF_FUNC became OF_FUNC_NAME)
The text was updated successfully, but these errors were encountered: