--- ray/src/cv/bsdftrans.cpp 2014/03/26 02:52:31 2.1 +++ ray/src/cv/bsdftrans.cpp 2014/03/26 22:29:08 2.2 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: bsdftrans.cpp,v 2.1 2014/03/26 02:52:31 greg Exp $"; +static const char RCSid[] = "$Id: bsdftrans.cpp,v 2.2 2014/03/26 22:29:08 greg Exp $"; #endif /* * Compute mass transport plan for RBF lobes @@ -35,8 +35,13 @@ plan_transport(MIGRATION *mig) mig->rbfv[1]->vtotal; n = 0; /* minimize EMD */ - transportSimplex(&srcSig, &dstSig, &lobe_distance, flow, &n); - + try { + transportSimplex(&srcSig, &dstSig, &lobe_distance, flow, &n); + } catch (...) { + fprintf(stderr, "%s: caught exception from transportSimplex()!\n", + progname); + exit(1); + } while (n-- > 0) /* assign sparse matrix */ mtx_coef(mig, flow[n].from, flow[n].to) = flow[n].amount; }