• qaz@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    10 个月前

    I find it quite difficult to properly define the differences between the two.

    The handling is enforced by one while the other may be unknown to the person who calls the function. I think that’s a pretty clear difference.

    • Ephera@lemmy.ml
      link
      fedilink
      arrow-up
      2
      ·
      10 个月前

      But that’s what I mentioned regarding Java there. Java calls them “exceptions”, but generally forces the caller to either handle them or explicitly bubble them upwards…