X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=segmentation%2FclitkExtractLung.cxx;h=b39f621ca80c41b5d8e7b675e5e6b52fc26e0185;hb=d30d301ddbebb5f290f8d9c0104dc6448ea531e1;hp=01ed6a830611a44490ce42137d85ee7d01578942;hpb=e008d74b0ecdc4ca2eaae8c429901a78f9ef5c31;p=clitk.git diff --git a/segmentation/clitkExtractLung.cxx b/segmentation/clitkExtractLung.cxx index 01ed6a8..b39f621 100644 --- a/segmentation/clitkExtractLung.cxx +++ b/segmentation/clitkExtractLung.cxx @@ -23,7 +23,6 @@ //-------------------------------------------------------------------- int main(int argc, char * argv[]) { - // Init command line GGO(clitkExtractLung, args_info); CLITK_INIT; @@ -33,10 +32,11 @@ 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::cerr << e.what() << std::endl; } return EXIT_SUCCESS;