trilemma-dev / SecureXPC

A simple and secure XPC framework for Swift
MIT License
75 stars 15 forks source link

Introduces optional error handlers for each route #75

Closed jakaplan closed 2 years ago

jakaplan commented 2 years ago

A global error handler remains, but now exists for global errors like a request for route that's not registered or insecure connection.

Decoding of a message type and encoding of a reply type and/or error type are still sent to the global error handler. Ideally those would also be sent to the route specific one. If we like this approach, can take a look at doing that next.

jakaplan commented 2 years ago

@amomchilov I'd appreciate getting your thoughts on this approach. If you think it's a good idea, I'd also welcome a code review although this approach is currently incomplete - it should also have applicable decoding/encoding errors go to the route's error handler and not the global one.

jakaplan commented 2 years ago

@amomchilov Thought on this approach? Genuinely unsure if this is actually helpful or not.

jakaplan commented 2 years ago

Not convinced this is the correct approach, so closing for the time being. Can always be reconsidered in the future.

amomchilov commented 2 years ago

Sorry, this slipped through the cracks, I never even took a look at it :o