~chris-rogers/maus/emr_mc_digitization

« back to all changes in this revision

Viewing changes to src/py_cpp/optics/PyCovarianceMatrix.cc

  • Committer: Chris Rogers
  • Date: 2014-04-16 11:48:45 UTC
  • mfrom: (707 merge)
  • mto: This revision was merged to the branch mainline in revision 711.
  • Revision ID: chris.rogers@stfc.ac.uk-20140416114845-h3u3q7pdcxkxvovs
Update to trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
 
75
75
    try {
76
76
        value = (*cm)(row, col);
77
 
    } catch(std::exception& exc) {
 
77
    } catch (std::exception& exc) {
78
78
        PyErr_SetString(PyExc_IndexError, (&exc)->what());
79
79
        return NULL;
80
80
    }
120
120
 
121
121
    try {
122
122
        cm->set(row, col, value);
123
 
    } catch(std::exception& exc) {
 
123
    } catch (std::exception& exc) {
124
124
        PyErr_SetString(PyExc_IndexError, (&exc)->what());
125
125
        return NULL;
126
126
    }
396
396
std::string(" - dispersion_prime_x (float): dispersion prime in x\n")+
397
397
std::string("   direction (derivative with respect to s) [?]\n")+
398
398
std::string(" - dispersion_y (float): dispersion in y direction [?]\n")+
399
 
std::string(" - dispersion_prime_x (float): dispersion prime in y\n")+
 
399
std::string(" - dispersion_prime_y (float): dispersion prime in y\n")+
400
400
std::string("   direction (derivative with respect to s) [?]\n");
401
401
 
402
402
PyObject* create_from_penn_parameters
491
491
    // now initialise the internal covariance matrix
492
492
    try {
493
493
        cm->cov_mat = create_from_numpy_matrix(array);
494
 
    } catch(std::exception& exc) {
 
494
    } catch (std::exception& exc) {
495
495
        PyErr_SetString(PyExc_RuntimeError, (&exc)->what());
496
496
        free(cm);
497
497
        return NULL;