Doing some functional programming in Scala, and coming from a Java background, I tend to throw my exceptions like this:
throw new MyException("something is wrong")
However, I've also seen people omit new
:
throw MyException("something is wrong")
Which is the more idiomatic way?