Closed gaurab4163 closed 5 years ago
Thank you for your pull request! Someone will soon check it and start the builds.
Note that by submitting a contribution to SOFA, you hereby accept and agree to the terms and conditions detailed in the associated DCO
Thanks for your PR @gaurab4163 :+1:
I'm not sure about the place (file and namespace) this function should be. @damienmarchal you have a clearer vision of logging and messages in SOFA, what do you think?
Nice,
I'm happy someone make some proposal on this topic. I think we should factor the common messages, I don't think message.h/cpp is the right place for that.
I would put that either in separated place like containing only message:
Alternative: use a real text-framework that is suppose to externalise all the texts from the source code (to internationalize Sofa...but this wuold be time consuming work)
DM.
@damienmarchal source code of base class for loader sounds right. Working on it :+1:
btw, i wondered why not use if
and cout()
than msg_error()
and msg_error_when()
. then came across #190 . It was very impressive. :+1:
Moved the function to base class for loaders in last commit. Please review.
Why did you revert a commit in https://github.com/sofa-framework/sofa/pull/639/commits/ce882f37c3ade741d8bb47160dc42d0007cfc60f ?
We discussed this PR during our weekly dev meeting. The content is good, the placement is still perfectible. We agreed on creating a new class FileMessage
in SofaKernel/framework/sofa/helper/messaging/FileMessage.{h,cpp}
(new files) to contain your static function.
Is that ok for you? Could you implement it? Thank you for your reactivity :wink:
Oh... when I made last commit, I meant to revert a37ba08. Had been awake for more than 40 hours(academics, tests, etc.) and evidently, wasn't thinking properly. (Slept like a baby right after last commit. :grin: ) Will adjust this in next commit.
Creating new files sounds right. I have another exam tomorrow. Will do right after it. :+1:
Hey @gaurab4163, do you have some time to continue this work?
Hey @guparan , my final exams started last thursday and will continue until this friday(4th may). Just been crazy busy in last month overall. So, I ll get to it right after it.
@guparan there is no messaging
folder. did you mean
SofaKernel/framework/sofa/helper/logging/FileMessage.{h,cpp}
instead of
SofaKernel/framework/sofa/helper/messaging/FileMessage.{h,cpp}
@gaurab4163 yes sorry for the missunderstood, the files should be placed in a new folder named: SofaKernel/framework/sofa/helper/messaging/ not in logging/ Could you change your commit and move the files. Thx.
[ci-build][with-scene-tests]
@epernod sure. just to make sure, the new class FileMessage
will be placed in sofa::helper::messaging
namespace too, right?
yes
[ci-build][with-scene-tests]
thanks @gaurab4163 for the change. Could you just check the reviews, there is 2 files to remove: a .log and .view Then it is ok to go I think.
[ci-build][with-scene-tests]
This PR has been re-open in #669, So i close it, thank all for the work.
For consistency purpose, added a helper function to handle the file related errors for loaders and components.
To use it:
Modified the usage in only "MeshTrian.cpp". With feedback, if I am in right direction, I will make changes to other loader and component accordingly.Solving issue #197
This PR:
Reviewers will merge only if all these checks are true.