logoalt Hacker News

mahmoudimus12/09/20240 repliesview on HN

We solved this by introducing a Result library.

  load("@.../result", result=result)

  
  def throw(arg):
      return 1/0
  if result.Result(throw).map(arg).is_ok:
     # proceed
  else:
     fail("...")