Better HN
topnewbestaskshowjobs
Log inSign up

0xfadedace

1 karma · joined Mar 25, 2016 (10y ago) · 1 submissions

Submissions

comment 10y ago · link · parent

A convention I've seen in Java libraries and that I'm fond of is:

  public sort() {
    preconds()
    try {
      doSort()
    } catch (ex) {
      handle(ex)
    }
    postconds()
  }

  private doSort() throws Exception {
    // core impl
  }