Improved errorhandler for ECMModel.scala