Closed
Description
Error handling inside a CRUD function could be divided into two categories (do or dont do try catch inside CRUD) -- also see similar Midori model here:
- Type 1: Functional or syntactic errors
- Type 2: 'not found' / duplicate / invalid value errors / cannot execute
Repeat example from #134
fg = initfg()
flag, var = addVariable!(fg, :x1, Pose2)
@assert flag
flag, var__ = addVariable!(fg, :x1, Pose2)
@assert !flag
# var__ should be empty container, but specifically in this case could also be same as var
Only do try catch on CRUD Type 2 errors?
Example DB, bad comms, etc. Similar discussion for internal retries. Type 2 errors would then also return @assert
!flag if internal try catch or retries expired.