Use more suitable Exception class.