• jesse-sony's avatar
    Feature/local exception translator (#2650) · d65edfb0
    jesse-sony authored
    * Create a module_internals struct
    
    Since we now have two things that are going to be module local, it felt
    correct to add a struct to manage them.
    
    * Add local exception translators
    
    These are added via the  register_local_exception_translator function
    and are then applied before the global translators
    
    * Add unit tests to show the local exception translator works
    
    * Fix a bug in the unit test with the string value of KeyError
    
    * Fix a formatting issue
    
    * Rename registered_local_types_cpp()
    
    Rename it to get_registered_local_types_cpp() to disambiguate from the
    new member of module_internals
    
    * Add additional comments to new local exception code path
    
    * Add a register_local_exception function
    
    * Add additional unit tests for register_local_exception
    
    * Use get_local_internals like get_internals
    
    * Update documentation for new local exception feature
    
    * Add back a missing space
    
    * Clean-up some issues in the docs
    
    * Remove the code duplication when translating exceptions
    
    Separated out the exception processing into a standalone function in the
    details namespace.
    
    Clean-up some comments as per PR notes as well
    
    * Remove the code duplication in register_exception
    
    * Cleanup some formatting things caught by clang-format
    
    * Remove the templates from exception translators
    
    But I added a using declaration to alias the type.
    
    * Remove the extra local from local_internals variable names
    
    * Add an extra explanatory comment to local_internals
    
    * Fix a typo in the code
    d65edfb0
test_local_bindings.cpp 4.29 KB