don't use print, just raise an exception (can be a custom if you want/need)