Wrong exception was used.