wrapped parse_compra in try