use fail_with(Exploit::Failure::Blah, "Message")
https://dev.metasploit.com/api/Msf/Exploit/Failure.html