title: How to supply transformed params to superclass constructor while avoiding inline computations with Scala
body: <p>This is my current unsatisfactory solution to the problem of manipulating the values passed to the subclass constructor before passing onto the superclass constructor,</p>
  
  <pre><code>class MissingItemsException(items: Set[String], itemsCategory: String)
    extends RuntimeException(MissingItemsException.makeMessage(items, itemsCategory))
  
  private object MissingItemsException {
  
    private def makeMessage(items: Set[String], itemsCategory: String): String = {
      /* Format set as ['α','β','γ'] */
      val Items = items mkString ("['", "','", "']")
      "the following items %s were missing from '%s'" format (items, itemsCategory)
    }
  
  }
  </code></pre>
  
  <p>Is there a way of factoring out the transformation so that the transformation code remains close to the point of use while keeping the code legible?</p>