how to throw an exception intentionally