mike a code to test tf exceptions