raise error for undefined methods, try/catch in rand tests