Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's even nicer in Rust: there can be an "implicit" conversion between the error raised by foo and bar:

  fn foo() -> Result<(),FooError>
      bar()?
  
  fn bar() -> Result<(),BarError>
If FooError can be created from BarError, the compiler will insert the conversion call and errors bubbles up nicely.


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

Search: