-
Notifications
You must be signed in to change notification settings - Fork 98
refactor: Centralize error output #3902
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
base: develop
Are you sure you want to change the base?
Conversation
… link between GEOS_THROW_CTX_IF and LVARRAY_THROW_IF_TEST( EXP, MSG, TYPE )
… in try/catch statements Problem: Retrieves everything that was thrown, so not just the message.
…/catch in main)": remove useless try/catch
…y spaces. The previous condition checked whether an argument was present and whether the option was immediately followed by a value like -test"value", which excluded valid cases like -test "value" et -test "value".
src/coreComponents/dataRepository/unitTests/testErrorHandling.cpp
Outdated
Show resolved
Hide resolved
src/coreComponents/dataRepository/unitTests/testErrorHandling.cpp
Outdated
Show resolved
Hide resolved
| * @note - local instances are possible for more specialized logging. | ||
| * - currently not available on GPU, use GEOS_WARNING/ERROR/ASSERT macros for this usecase. | ||
| */ | ||
| GEOS_HOST static ErrorLogger & global(); |
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.
I see your point, but just use thread_local here
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.
Also I was wondering, what about the thread_local instances initialization?
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.
An approach would be to remove this thread_local and add mutexes in output functions (see)
Remove code duplication found in
GEOS_THROW,GEOS_ERROR,GEOS_WARNINGand put into a static function inErrorLogger.Called while
flushErrorMsg().Move all Exceptions under GeosExceptions.hpp