rst segmentation: added exception handling