Use the more compatible way to throw the exception.