Commit 4033c6b0 authored by Emmanuel Promayon's avatar Emmanuel Promayon
Browse files

FIXED it is recommanded to use const & in catch

parent c90cd020
......@@ -70,11 +70,11 @@ int main(int argc, char** argv) {
usage(argv[0]);
return EXIT_FAILURE;
}
catch (camitk::AbortException& e) {
catch (const camitk::AbortException& e) {
std::cout << argv[0] << " aborted..." << std::endl << "camitk AbortException:" << std::endl << e.what() << std::endl;
return EXIT_FAILURE;
}
catch (std::exception& e) {
catch (const std::exception& e) {
std::cout << argv[0] << " aborted..." << std::endl << "std AbortException:" << std::endl << e.what() << std::endl;
return EXIT_FAILURE;
}
......
......@@ -123,12 +123,12 @@ int main(int argc, char* argv[]) {
usage(argv[0]);
return EXIT_FAILURE;
}
catch (camitk::AbortException& e) {
catch (const camitk::AbortException& e) {
//QMessageBox::warning(NULL, QString(argv[0]) + " aborted...", "AbortException:" + QString(e.what()));
std::cout << argv[0] << " aborted..." << std::endl << "camitk AbortException:" << std::endl << e.what() << std::endl;
return EXIT_FAILURE;
}
catch (std::exception& e) {
catch (const std::exception& e) {
//QMessageBox::warning(NULL, QString(argv[0]) + " aborted...", "AbortException:" + QString(e.what()));
std::cout << argv[0] << " aborted..." << std::endl << "std AbortException:" << std::endl << e.what() << std::endl;
return EXIT_FAILURE;
......
......@@ -77,11 +77,11 @@ int main(int argc, char* argv[]) {
usage(argv[0]);
return EXIT_FAILURE;
}
catch (camitk::AbortException& e) {
catch (const camitk::AbortException& e) {
std::cout << argv[0] << " aborted..." << std::endl << "camitk AbortException:" << std::endl << e.what() << std::endl;
return EXIT_FAILURE;
}
catch (std::exception& e) {
catch (const std::exception& e) {
std::cout << argv[0] << " aborted..." << std::endl << "std AbortException:" << std::endl << e.what() << std::endl;
return EXIT_FAILURE;
}
......
......@@ -28,7 +28,6 @@ if (XSD_COMMAND)
endforeach()
else()
message(FATAL_ERROR "Cannot find xsdcxx command: please install XSD / check xsd binary is in your sytem PATH.")
set(MML_GENERATE_XSD_LIB OFF)
endif()
camitk_library(STATIC
......
......@@ -145,11 +145,11 @@ int main(int argc, char* argv[]) {
}
}
}
catch (camitk::AbortException& e) {
catch (const camitk::AbortException& e) {
std::cout << argv[0] << " aborted..." << std::endl << "camitk AbortException:" << std::endl << e.what() << std::endl;
return EXIT_FAILURE;
}
catch (std::exception& e) {
catch (const std::exception& e) {
std::cout << argv[0] << " aborted..." << std::endl << "std AbortException:" << std::endl << e.what() << std::endl;
return EXIT_FAILURE;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment