InvalidArgumentException Handling Fails

I am experiencing this InvalidArgumentException and tried to handle it using “try-catch” this is my code but it seems to be it is still not handling it.

try {
driver.get(CreditArrangementUrl)

DriverFactory.changeWebDriver(driver)

}catch (InvalidArgumentException e){
println (“is fine”)
}