-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
Eliminate exceptions or make them optional. One idea is to have the return value of write_message indicate how to proceed. One response could be "Throw".
Replace error() / warning() etc. with messageType
Message format: Often useful to use form: GridAxis 'MyAxis': Linear extrapolation bogus
Messages should be returned as const char* or const string& (not string_view).
Additional thoughts
- Remove context_pointer from Courierr. Given that Courierr is intended to be an interface with the specifics to be provided in derived classes, it seems overthinking-ish to include context_pointer in the base class. Not all derived schemes will need a void*. In particular, I am exploring a template-based derived class that uses a typed pointer, so I am either going to ignore the void* or use it with awkward casting. Let the derived classes provide any needed state storage.
- Change the btwxt throws to logged Errors. Let the derived logging function decide whether to throw. For btwxt, change class BtwxtLogger to do the throw. Default behavior is thus unchanged, but there is more flexibility.
- Perhaps elaborate the intent of the Courierr message types. For example, error() could be documented as assuming the application code will never return. That could actually be enforced with modest restructuring of Courierr -- set things up so if the derived class error() returns, the application aborts.
- Review functions that return after logging, if return is meaningless we may want to throw
- Make courierr use const string& instead of string_view
- Document courierr better (example with
write_message
) - Add name to RGI for messaging
- Cleaner message wording
Metadata
Metadata
Assignees
Labels
No labels