Ruby:customized error