test various exception throwing