vector <float>EMData::calc_fourier_shell_correlation(EMData * with){ if (!with) { throw NullPointerException("NULL input image"); } if (!EMUtil::is_same_size(this, with)) { LOGERR("images not same size"); throw ImageFormatException( "images not same size"); } //... }
void foo() { EMData* e1 = new EMData(); EMData* e2 = new EMData(); try { e1->read_image("test1.mrc"); e2->read_image("test2.mrc"); vector<float> v = e1->calc_fourier_shell_correlation(e2); } catch (E2Exception & exception) { printf("%s\n", exception.what()); } }
void foo() { EMData* e1 = new EMData(); EMData* e2 = new EMData(); try { e1->read_image("test1.mrc"); e2->read_image("test2.mrc"); vector<float> v = e1->calc_fourier_shell_correlation(e2); } catch (_NullPointerException & exception) { printf("%s\n", exception.what()); } }
Note the ``_'' before _NullPointerException.