use invalidargument exception of dependency injection namespace instead of global