Change return value to exception