Catch invalid URI exception.