X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=segmentation%2FclitkExtractLymphStations.cxx;h=25b52894dea649c773802d5bed4662bb3a8f4c7b;hb=578e4e5a84a390592ba6b2a7e8bff22dba19ccd0;hp=cf392f8d399a8ea866a53e8d28f7c6e6f2ac5f24;hpb=e008d74b0ecdc4ca2eaae8c429901a78f9ef5c31;p=clitk.git diff --git a/segmentation/clitkExtractLymphStations.cxx b/segmentation/clitkExtractLymphStations.cxx index cf392f8..25b5289 100644 --- a/segmentation/clitkExtractLymphStations.cxx +++ b/segmentation/clitkExtractLymphStations.cxx @@ -33,10 +33,12 @@ int main(int argc, char * argv[]) FilterType::Pointer filter = FilterType::New(); filter->SetArgsInfo(args_info); - filter->Update(); - - if (filter->HasError()) { - std::cout << filter->GetLastError() << std::endl; + + try { + filter->Update(); + } catch(std::runtime_error e) { + std::cout << e.what() << std::endl; + return EXIT_FAILURE; } return EXIT_SUCCESS;