HomePhabricator
Diffusion Comm efdc1b57c857

[serivces] Fix error handling for retreiving from database

Description

[serivces] Fix error handling for retreiving from database

Summary:
We want to catch logic_error instead of std::out_of_range when dealing with stoll.
This is because stoll may throw two different errors:

Both of them inherit from logic_error https://en.cppreference.com/w/cpp/error/logic_error

Test Plan: You may want to intentionally trigger each of these errors and see if the code catches them.

Reviewers: geekbrother, palys-swm, varun, ashoat, jimpo

Reviewed By: palys-swm, ashoat

Subscribers: benschac, ashoat, palys-swm, Adrian, atul

Differential Revision: https://phabricator.ashoat.com/D3130

Details

Provenance
karolAuthored on Feb 9 2022, 12:29 AM
Reviewer
tomek
Differential Revision
D3130: [serivces] Fix error handling for retreiving from database
Parents
rCOMM65913eccfae3: [services] Fix running all services
Branches
Unknown
Tags
Unknown