add ruby exceptional handling