Page MenuHomePhabricator

[services] Rust Integration - Catch std::exception in base bidi reactor
ClosedPublic

Authored by karol on Sep 1 2022, 11:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 23, 4:16 AM
Unknown Object (File)
Sat, Dec 14, 6:15 AM
Unknown Object (File)
Sat, Dec 14, 6:15 AM
Unknown Object (File)
Sat, Dec 14, 6:15 AM
Unknown Object (File)
Sat, Dec 14, 6:14 AM
Unknown Object (File)
Sat, Dec 14, 6:08 AM
Unknown Object (File)
Mon, Dec 2, 10:54 AM
Unknown Object (File)
Nov 22 2024, 8:30 AM

Details

Summary

Depends on D5020

Linear task: https://linear.app/comm/issue/ENG-1727/catch-stdexception-in-base-reactors

We started using rust, and we use functions that return Result. That Result is then converted into a std::exception in c++ when it returns Err. All over the place in the reactors we handle std::runtime_errors but we should go higher in the hierarchy and catch std::exceptions.

Test Plan
cd services
yarn run-integration-tests backup

Works as before (of course, you have to start backup and blob services first).

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

This revision is now accepted and ready to land.Sep 5 2022, 7:23 AM
services/lib/src/server-base-reactors/ServerBidiReactorBase.h
101

I'm not really sure. Maybe we can keep the current implementation and additionally catch just rust::Error, so that the rest of the logic isn't affected?

services/lib/src/server-base-reactors/ServerBidiReactorBase.h
101

The problem is that rust::Error is not visible. In the generated files, it is defined only in the source file, not in the header.

This revision was landed with ongoing or failed builds.Sep 8 2022, 4:10 AM
This revision was automatically updated to reflect the committed changes.