-
Notifications
You must be signed in to change notification settings - Fork 46
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
[SceneLoader] Add a special error message handler for DeprecationWarning #384
[SceneLoader] Add a special error message handler for DeprecationWarning #384
Conversation
…ionWarning Otherwise deprecation messages appears as error which is misleading for users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we move on with this PR?
Co-authored-by: Alex Bilger <alxbilger@users.noreply.github.com>
Yes :) |
It would be nice, any update @damienmarchal ? |
if( py::isinstance(e.type(), py::eval("type(DeprecationWarning)")) ) | ||
{ | ||
msg_deprecated() << ss.str(); | ||
}else |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
}else | |
} | |
else |
{ | ||
msg_error() << ss.str(); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…ing (sofa-framework#384) * [SofaPython3/Plugin] Add a special error message handler for DeprecationWarning Otherwise deprecation messages appears as error which is misleading for users. * Update Plugin/src/SofaPython3/SceneLoaderPY3.cpp Co-authored-by: Alex Bilger <alxbilger@users.noreply.github.com> --------- Co-authored-by: Alex Bilger <alxbilger@users.noreply.github.com>
…ing (#384) * [SofaPython3/Plugin] Add a special error message handler for DeprecationWarning Otherwise deprecation messages appears as error which is misleading for users. * Update Plugin/src/SofaPython3/SceneLoaderPY3.cpp Co-authored-by: Alex Bilger <alxbilger@users.noreply.github.com> --------- Co-authored-by: Alex Bilger <alxbilger@users.noreply.github.com>
Currently DeprecationWarning exception risen by python code are reported as msg_error()
which is misleading. The PR detect it so it is reported with msg_deprecated()
This is the source of this:
SofaDefrost/STLIB#117