You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently jwt-cpp uses exceptions to signal errors and bad tokens.
In some environments exceptions might not be wanted (performance critical code) or not available (embedded).
In order to support this we need to convert all internal functions to use error codes.
Following the standard, an error_category should be unique in a given process. This is pretty much impossible for a header only library, but we should at least provide the option to have it compliant. One option would be to provide some preprocessor defines, which (when defined) will use extern to get the error category and a second one to emit the implementation in a translation unit. It then would be the users responsibility to make sure the actuall implementation resides in the main process and all other code has the extern option defined.
The text was updated successfully, but these errors were encountered:
Currently jwt-cpp uses exceptions to signal errors and bad tokens.
In some environments exceptions might not be wanted (performance critical code) or not available (embedded).
In order to support this we need to convert all internal functions to use error codes.
Following the standard, an error_category should be unique in a given process. This is pretty much impossible for a header only library, but we should at least provide the option to have it compliant. One option would be to provide some preprocessor defines, which (when defined) will use extern to get the error category and a second one to emit the implementation in a translation unit. It then would be the users responsibility to make sure the actuall implementation resides in the main process and all other code has the extern option defined.
The text was updated successfully, but these errors were encountered: