global

def safe_yield(*, &block)

def safe_yield(*, &block)
  block.call(*)
rescue Exception => e
  raise StatelyDB::Error.from(e)
end