feat: introduce detailed error handling for flag parsing
- Added a new utility function, detail::FlagParseFatal, to handle fatal errors during flag parsing, improving error reporting and program termination. - Replaced existing runtime error throws with calls to FlagParseFatal for unrecognized flags and parsing failures, ensuring consistent error handling. - Updated header file to declare the new function, enhancing code organization and clarity.
This commit is contained in:
@@ -42,7 +42,13 @@ target_link_libraries(yaze_util PUBLIC
|
||||
# Add Abseil dependencies if gRPC is enabled
|
||||
# We link to grpc++ which transitively provides Abseil and ensures correct build order
|
||||
if(YAZE_ENABLE_GRPC)
|
||||
target_link_libraries(yaze_util PUBLIC grpc++)
|
||||
target_link_libraries(yaze_util PUBLIC
|
||||
grpc++
|
||||
absl::status
|
||||
absl::statusor
|
||||
absl::strings
|
||||
absl::str_format
|
||||
)
|
||||
endif()
|
||||
|
||||
set_target_properties(yaze_util PROPERTIES
|
||||
|
||||
Reference in New Issue
Block a user