Hacker News new | past | comments | ask | show | jobs | submit login

The equivalent Python would be:

    result, errmsg = do_stuff()
    
    if errmsg:
      error(f"Error in do_stuff: {errmsg}")
    
    print(result+5)
Assuming that errmsg is 'None' when do_stuff() succeeds.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: