added docs. better ruby exception hierarchy.