Skip to content
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

[SofaKernel] Improve File:line info in error message (for python and xml error reporting) #314

Merged
merged 9 commits into from
Jul 20, 2017

Conversation

damienmarchal
Copy link
Contributor

@damienmarchal damienmarchal commented Jul 3, 2017

Currently when object are unable to be created there is no filename/line information on where the problem come from.

In this PR I implemented the missing <<operator in messaging.h to report those line number.
Now you can write:

  msg_info() << SOFA_FILE_INFO_COPIED_FROM("myPythonFile.py", 4) << "blah balh" 

To have the file name & line number associated in the message emitting information. If you don't the emitting information will be the source code file&line location.

If updated the xml load to take this feature into account.
The python loader is updated in the PR #304


This PR:

  • builds with SUCCESS for all platforms on the CI.
  • does not generate new warnings.
  • does not generate new unit test failures.
  • does not generate new scene test failures.
  • does not break API compatibility.
  • is more than 1 week old (or has fast-merge label).

Reviewers will merge only if all these checks are true.

@bcarrez
Copy link
Contributor

bcarrez commented Jul 4, 2017

[ci-build]

@damienmarchal damienmarchal changed the title [SofaKernel] [SofaKernel] Improve File:line info in error message (to be used with python and xml error reporting) Jul 4, 2017
@damienmarchal damienmarchal changed the title [SofaKernel] Improve File:line info in error message (to be used with python and xml error reporting) [SofaKernel] Improve File:line info in error message (for python and xml error reporting) Jul 4, 2017
@damienmarchal damienmarchal added enhancement About a possible enhancement pr: fast merge Minor change that can be merged without waiting for the 7 review days pr: status to review To notify reviewers to review this pull-request labels Jul 4, 2017
@damienmarchal
Copy link
Contributor Author

[ci-build]

@bcarrez
Copy link
Contributor

bcarrez commented Jul 5, 2017

Note: the build fail on OSX is due to API change in boost 1.64 that makes the Multithreading plugin fail to build. I would not pay attention to it until Multithreading is fixed.

@damienmarchal damienmarchal added pr: status ready Approved a pull-request, ready to be squashed and removed pr: status to review To notify reviewers to review this pull-request labels Jul 5, 2017
@damienmarchal damienmarchal added pr: status to review To notify reviewers to review this pull-request and removed pr: status ready Approved a pull-request, ready to be squashed labels Jul 5, 2017
@hugtalbot hugtalbot added pr: status ready Approved a pull-request, ready to be squashed and removed pr: status to review To notify reviewers to review this pull-request labels Jul 12, 2017
@hugtalbot
Copy link
Contributor

[ci-build]

@damienmarchal
Copy link
Contributor Author

Fixed the conflict...let's rebuild

@hugtalbot
Copy link
Contributor

Just a SOFA_FILE_INFO2 to replace with SOFA_FILE_INFO_COPIED_FROM in Binding_SofaModule.cpp

@hugtalbot
Copy link
Contributor

great @damienmarchal , unfortunately ci is down for the day !
Let's rebuild tomorrow

@damienmarchal
Copy link
Contributor Author

[ci-build]

@damienmarchal damienmarchal merged commit 6e9ac71 into sofa-framework:master Jul 20, 2017
@damienmarchal
Copy link
Contributor Author

The CI finished but the dashboard is not up-to date.
The test failure are pre-existing to the PR. So I merge it.

matthieu-nesme pushed a commit to Anatoscope/sofa that referenced this pull request Aug 4, 2017
…ation

[SofaKernel] Improve File:line info in error message (for python and xml error reporting)
(cherry picked from commit 6e9ac71)
@guparan guparan modified the milestone: v17.12 Sep 13, 2017
@damienmarchal damienmarchal deleted the fix_msg_objcreation branch September 20, 2017 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement About a possible enhancement pr: fast merge Minor change that can be merged without waiting for the 7 review days pr: status ready Approved a pull-request, ready to be squashed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants