fix throwing of exceptions, should be "throw new Exception(...)"