test throw exception