diff --git a/.gitattributes b/.gitattributes index 6e07f483bd..803f17ffe9 100644 --- a/.gitattributes +++ b/.gitattributes @@ -18,10 +18,12 @@ CMakeLists.txt text eol=lf # Text file formats *.txt text eol=lf +*.text text eol=lf *.md text eol=lf *.tex text eol=lf *.?ml text eol=lf *.kmz binary +*.log text eol=lf # Programming languages *.htm? text eol=lf @@ -54,12 +56,21 @@ CMakeLists.txt text eol=lf ###################### # Known binary files +# executables, libraries; yes, sometimes they're part of a repository +*.exe binary +*.out binary +lib*.so* binary +*.dll binary +lib*.a* binary +*.lib binary + # from various unit_test/ directories *.dat binary *.*hdr binary *.flat binary *.sig binary *.bin binary +*.dump binary # images *.bmp binary diff --git a/externals/coda-oss/.gitattributes b/externals/coda-oss/.gitattributes index 6e07f483bd..803f17ffe9 100644 --- a/externals/coda-oss/.gitattributes +++ b/externals/coda-oss/.gitattributes @@ -18,10 +18,12 @@ CMakeLists.txt text eol=lf # Text file formats *.txt text eol=lf +*.text text eol=lf *.md text eol=lf *.tex text eol=lf *.?ml text eol=lf *.kmz binary +*.log text eol=lf # Programming languages *.htm? text eol=lf @@ -54,12 +56,21 @@ CMakeLists.txt text eol=lf ###################### # Known binary files +# executables, libraries; yes, sometimes they're part of a repository +*.exe binary +*.out binary +lib*.so* binary +*.dll binary +lib*.a* binary +*.lib binary + # from various unit_test/ directories *.dat binary *.*hdr binary *.flat binary *.sig binary *.bin binary +*.dump binary # images *.bmp binary diff --git a/externals/coda-oss/build/scripts/makeEnums.py b/externals/coda-oss/build/scripts/makeEnums.py index 911a7fefee..6e909511c3 100755 --- a/externals/coda-oss/build/scripts/makeEnums.py +++ b/externals/coda-oss/build/scripts/makeEnums.py @@ -110,7 +110,7 @@ def cmpValues(x, y): s.write(' %sif (s == "%s")\n value = %s%s;\n' % (i > 0 and 'else ' or '', n, values.cleanPrefix, item.names[0].replace(' ', '_'))) i += 1 - s.write(' else\n throw except::InvalidFormatException(Ctxt(FmtX("Invalid enum value: %s", s.c_str())));\n') + s.write(' else\n throw except::InvalidFormatException(Ctxt(str::Format("Invalid enum value: %s", s.c_str())));\n') s.write(' }\n\n') s.write(' //! int constructor\n') @@ -123,7 +123,7 @@ def cmpValues(x, y): try: idx += 1 except:{} - s.write(' default:\n throw except::InvalidFormatException(Ctxt(FmtX("Invalid enum value: %d", i)));\n') + s.write(' default:\n throw except::InvalidFormatException(Ctxt(str::Format("Invalid enum value: %d", i)));\n') s.write(' }\n }\n\n') s.write(' //! destructor\n') @@ -142,7 +142,7 @@ def cmpValues(x, y): try: idx += 1 except:{} - s.write(' default:\n throw except::InvalidFormatException(Ctxt(FmtX("Invalid enum value: %d", value)));\n') + s.write(' default:\n throw except::InvalidFormatException(Ctxt(str::Format("Invalid enum value: %d", value)));\n') s.write(' }\n }\n\n') s.write(' //! assignment operator\n') diff --git a/externals/coda-oss/modules/c++/dbi/tests/SQLTest1.cpp b/externals/coda-oss/modules/c++/dbi/tests/SQLTest1.cpp index dbca6e5e83..ad1b0eb8d7 100644 --- a/externals/coda-oss/modules/c++/dbi/tests/SQLTest1.cpp +++ b/externals/coda-oss/modules/c++/dbi/tests/SQLTest1.cpp @@ -30,7 +30,7 @@ int main(int argc, char* argv[]) { try { - if (argc < 4) throw except::Exception(Ctxt(FmtX("Usage %s [host] [port]", argv[0]))); + if (argc < 4) throw except::Exception(Ctxt(str::Format("Usage %s [host] [port]", argv[0]))); std::string database(argv[1]); std::string user(argv[2]); diff --git a/externals/coda-oss/modules/c++/dbi/tests/SQLTest2.cpp b/externals/coda-oss/modules/c++/dbi/tests/SQLTest2.cpp index 843a4d2780..c1bc60f2d7 100644 --- a/externals/coda-oss/modules/c++/dbi/tests/SQLTest2.cpp +++ b/externals/coda-oss/modules/c++/dbi/tests/SQLTest2.cpp @@ -30,7 +30,7 @@ int main(int argc, char* argv[]) { try { - if (argc != 6) throw except::Exception(Ctxt(FmtX("Usage %s ", argv[0]))); + if (argc != 6) throw except::Exception(Ctxt(str::Format("Usage %s ", argv[0]))); std::string database(argv[1]); std::string host(argv[4]); diff --git a/externals/coda-oss/modules/c++/io/tests/ioTest1.cpp b/externals/coda-oss/modules/c++/io/tests/ioTest1.cpp index 56cd99924e..f803f47e89 100644 --- a/externals/coda-oss/modules/c++/io/tests/ioTest1.cpp +++ b/externals/coda-oss/modules/c++/io/tests/ioTest1.cpp @@ -33,7 +33,7 @@ int main(int argc, char **argv) { if (argc != 3) { - throw Exception(Ctxt(FmtX("Usage: %s ", + throw Exception(Ctxt(str::Format("Usage: %s ", argv[0]))); } diff --git a/externals/coda-oss/modules/c++/io/tests/ioTest3.cpp b/externals/coda-oss/modules/c++/io/tests/ioTest3.cpp index 39a85190b7..f00693da4f 100644 --- a/externals/coda-oss/modules/c++/io/tests/ioTest3.cpp +++ b/externals/coda-oss/modules/c++/io/tests/ioTest3.cpp @@ -48,7 +48,7 @@ int main(int argc, char **argv) try { if (argc != 3) - throw Exception(Ctxt(FmtX("Usage: %s ", argv[0]))); + throw Exception(Ctxt(str::Format("Usage: %s ", argv[0]))); Copy::run(argv[1], argv[2]); } diff --git a/externals/coda-oss/modules/c++/io/tests/ioTest4.cpp b/externals/coda-oss/modules/c++/io/tests/ioTest4.cpp index a45f89b7fe..7121f9b0eb 100644 --- a/externals/coda-oss/modules/c++/io/tests/ioTest4.cpp +++ b/externals/coda-oss/modules/c++/io/tests/ioTest4.cpp @@ -53,7 +53,7 @@ int main(int argc, char **argv) if (argc != 3) throw except::Error( Ctxt( - FmtX( + str::Format( "Usage: %s ", argv[0]))); diff --git a/externals/coda-oss/modules/c++/io/tests/serializeTest1.cpp b/externals/coda-oss/modules/c++/io/tests/serializeTest1.cpp index 2037899aee..01fb74dd89 100644 --- a/externals/coda-oss/modules/c++/io/tests/serializeTest1.cpp +++ b/externals/coda-oss/modules/c++/io/tests/serializeTest1.cpp @@ -47,9 +47,9 @@ class A : public Serializable virtual void serialize(OutputStream& os) override { os.writeln("Class A"); - os.writeln(FmtX("%f", vec[0])); - os.writeln(FmtX("%f", vec[1])); - os.writeln(FmtX("%f", vec[2])); + os.writeln(str::Format("%f", vec[0])); + os.writeln(str::Format("%f", vec[1])); + os.writeln(str::Format("%f", vec[2])); } virtual void deserialize(InputStream& is) override @@ -60,9 +60,9 @@ class A : public Serializable string vec_2 = fillString(is); assert(classType == "Class A"); - dbg.writeln(FmtX("vec[0] = %s", vec_0.c_str())); - dbg.writeln(FmtX("vec[1] = %s", vec_1.c_str())); - dbg.writeln(FmtX("vec[2] = %s", vec_2.c_str())); + dbg.writeln(str::Format("vec[0] = %s", vec_0.c_str())); + dbg.writeln(str::Format("vec[1] = %s", vec_1.c_str())); + dbg.writeln(str::Format("vec[2] = %s", vec_2.c_str())); vec[0] = str::toType(vec_0); vec[1] = str::toType(vec_1); diff --git a/externals/coda-oss/modules/c++/mt/tests/MTSingletonTest.cpp b/externals/coda-oss/modules/c++/mt/tests/MTSingletonTest.cpp index beb1719e35..e71dce3454 100644 --- a/externals/coda-oss/modules/c++/mt/tests/MTSingletonTest.cpp +++ b/externals/coda-oss/modules/c++/mt/tests/MTSingletonTest.cpp @@ -103,7 +103,7 @@ class Thespian : public Runnable } void run() override { - //__debugln__(FmtX("[%s]:", mName.c_str())); + //__debugln__(str::Format("[%s]:", mName.c_str())); doLines(); } virtual void doLines() = 0; diff --git a/externals/coda-oss/modules/c++/net.ssl/tests/SSLTestClient.cpp b/externals/coda-oss/modules/c++/net.ssl/tests/SSLTestClient.cpp index 074b4abb23..ff8db2b6fd 100644 --- a/externals/coda-oss/modules/c++/net.ssl/tests/SSLTestClient.cpp +++ b/externals/coda-oss/modules/c++/net.ssl/tests/SSLTestClient.cpp @@ -39,7 +39,7 @@ int main(int argc, char **argv) try { if (argc != 2) - throw Exception(FmtX("Usage: %s ", argv[0])); + throw Exception(str::Format("Usage: %s ", argv[0])); URL url(argv[1]); //int sslOn = atoi(argv[2]); diff --git a/externals/coda-oss/modules/c++/net.ssl/tests/SSLTestClientNoURL.cpp b/externals/coda-oss/modules/c++/net.ssl/tests/SSLTestClientNoURL.cpp index 60baa34faa..89c4d64764 100644 --- a/externals/coda-oss/modules/c++/net.ssl/tests/SSLTestClientNoURL.cpp +++ b/externals/coda-oss/modules/c++/net.ssl/tests/SSLTestClientNoURL.cpp @@ -40,7 +40,7 @@ int main(int argc, char** argv) try { if (argc != 3) - throw Exception(FmtX("Usage: %s ", argv[0])); + throw Exception(str::Format("Usage: %s ", argv[0])); std::string host(argv[1]); int port(atoi(argv[2])); diff --git a/externals/coda-oss/modules/c++/net/tests/NetConnectionClientTest.cpp b/externals/coda-oss/modules/c++/net/tests/NetConnectionClientTest.cpp index 992ac5eca0..abe0b35790 100644 --- a/externals/coda-oss/modules/c++/net/tests/NetConnectionClientTest.cpp +++ b/externals/coda-oss/modules/c++/net/tests/NetConnectionClientTest.cpp @@ -39,7 +39,7 @@ int main(int argc, char **argv) try { if (argc != 3) - throw Exception(FmtX("Usage: %s ", argv[0])); + throw Exception(str::Format("Usage: %s ", argv[0])); std::string host(argv[1]); int port(atoi(argv[2])); diff --git a/externals/coda-oss/modules/c++/net/tests/NetConnectionServerTest.cpp b/externals/coda-oss/modules/c++/net/tests/NetConnectionServerTest.cpp index ed72a907ba..0cb8cdb0cf 100644 --- a/externals/coda-oss/modules/c++/net/tests/NetConnectionServerTest.cpp +++ b/externals/coda-oss/modules/c++/net/tests/NetConnectionServerTest.cpp @@ -74,7 +74,7 @@ int main(int argc, char **argv) try { if (argc < 2) - throw Exception(FmtX("Usage: %s (-mt|-st|-tp)", argv[0])); + throw Exception(str::Format("Usage: %s (-mt|-st|-tp)", argv[0])); net::AllocStrategy* strategy = nullptr; diff --git a/externals/coda-oss/modules/c++/net/tests/SerializableTestClient.cpp b/externals/coda-oss/modules/c++/net/tests/SerializableTestClient.cpp index 229758ca3f..0c472bf09f 100644 --- a/externals/coda-oss/modules/c++/net/tests/SerializableTestClient.cpp +++ b/externals/coda-oss/modules/c++/net/tests/SerializableTestClient.cpp @@ -39,7 +39,7 @@ int main(int argc, char **argv) try { if (argc != 2) - throw Exception(FmtX("Usage: %s ", argv[0])); + throw Exception(str::Format("Usage: %s ", argv[0])); URL url(argv[1]); diff --git a/externals/coda-oss/modules/c++/net/tests/URLTest.cpp b/externals/coda-oss/modules/c++/net/tests/URLTest.cpp index aacde069ca..e6c5f79320 100644 --- a/externals/coda-oss/modules/c++/net/tests/URLTest.cpp +++ b/externals/coda-oss/modules/c++/net/tests/URLTest.cpp @@ -36,7 +36,7 @@ int main(int argc, char **argv) try { if (argc != 2) - throw Exception(FmtX("Usage: %s ", argv[0])); + throw Exception(str::Format("Usage: %s ", argv[0])); URL url(argv[1]); diff --git a/externals/coda-oss/modules/c++/str/tests/VersionTest.cpp b/externals/coda-oss/modules/c++/str/tests/VersionTest.cpp index aa1d9625dc..627696cdf5 100644 --- a/externals/coda-oss/modules/c++/str/tests/VersionTest.cpp +++ b/externals/coda-oss/modules/c++/str/tests/VersionTest.cpp @@ -25,7 +25,7 @@ int main() { - std::cout << FmtX("Your version of str is %d.%d.%d\n", + std::cout << str::Format("Your version of str is %d.%d.%d\n", STR_MAJOR_VERSION, STR_MINOR_VERSION, STR_MICRO_VERSION); std::cout << "Specialization for string test...\n"; std::string ok("This test passes"); diff --git a/externals/coda-oss/modules/c++/sys/tests/OSTest.cpp b/externals/coda-oss/modules/c++/sys/tests/OSTest.cpp index 330493eb76..79be99659a 100644 --- a/externals/coda-oss/modules/c++/sys/tests/OSTest.cpp +++ b/externals/coda-oss/modules/c++/sys/tests/OSTest.cpp @@ -92,7 +92,7 @@ int main(int argc, char **argv) std::string tempFileName = os.getTempName(); std::ofstream ofs(tempFileName.c_str()); if (!ofs.is_open()) - throw except::Exception(FmtX("Could not open file named: %s", + throw except::Exception(str::Format("Could not open file named: %s", tempFileName.c_str())); ofs << "Im writing some crap to this file!" << std::endl; ofs.close(); diff --git a/externals/coda-oss/modules/c++/tiff/tests/DumpHeader.cpp b/externals/coda-oss/modules/c++/tiff/tests/DumpHeader.cpp index 1c310f4419..2e0be41cbe 100644 --- a/externals/coda-oss/modules/c++/tiff/tests/DumpHeader.cpp +++ b/externals/coda-oss/modules/c++/tiff/tests/DumpHeader.cpp @@ -31,7 +31,7 @@ int main(int argc, char **argv) try { if (argc < 2) - throw except::Exception(FmtX("usage: %s ", argv[0])); + throw except::Exception(str::Format("usage: %s ", argv[0])); sys::OS os; std::string path = sys::Path::absolutePath(argv[1]); @@ -47,7 +47,7 @@ int main(int argc, char **argv) if (tiff::Utils::hasGeoTiffIFD(reader[i]->getIFD())) { outStream.writeln("==========================="); - outStream.writeln(FmtX("GeoTIFF detected: Image %d\n", (i + 1))); + outStream.writeln(str::Format("GeoTIFF detected: Image %d\n", (i + 1))); tiff::IFD *geoIFD = tiff::Utils::createGeoTiffIFD(reader[i]->getIFD()); geoIFD->print(outStream); diff --git a/externals/coda-oss/modules/c++/xml.lite/tests/AttributeValueTest.cpp b/externals/coda-oss/modules/c++/xml.lite/tests/AttributeValueTest.cpp index c66f466caa..01e66e1e0a 100644 --- a/externals/coda-oss/modules/c++/xml.lite/tests/AttributeValueTest.cpp +++ b/externals/coda-oss/modules/c++/xml.lite/tests/AttributeValueTest.cpp @@ -41,7 +41,7 @@ int main(int argc, char **argv) // Check to make sure we have right length if (argc != 2) - throw Exception(Ctxt(FmtX("Usage: %s \n", argv[0]))); + throw Exception(Ctxt(str::Format("Usage: %s \n", argv[0]))); // Create an input stream FileInputStream xmlFile(argv[1]); diff --git a/externals/coda-oss/modules/c++/xml.lite/tests/MinidomParserTest1.cpp b/externals/coda-oss/modules/c++/xml.lite/tests/MinidomParserTest1.cpp index ac5ffa42ea..aaa37b9abe 100644 --- a/externals/coda-oss/modules/c++/xml.lite/tests/MinidomParserTest1.cpp +++ b/externals/coda-oss/modules/c++/xml.lite/tests/MinidomParserTest1.cpp @@ -39,7 +39,7 @@ int main(int argc, char **argv) // Check to make sure we have right length if (argc != 2) - throw Exception(Ctxt(FmtX("Usage: %s \n", argv[0]))); + throw Exception(Ctxt(str::Format("Usage: %s \n", argv[0]))); // Create an input stream FileInputStream xmlFile(argv[1]); diff --git a/externals/coda-oss/modules/c++/xml.lite/tests/MinidomParserTest2.cpp b/externals/coda-oss/modules/c++/xml.lite/tests/MinidomParserTest2.cpp index ee28d77d8c..78c01da3bc 100644 --- a/externals/coda-oss/modules/c++/xml.lite/tests/MinidomParserTest2.cpp +++ b/externals/coda-oss/modules/c++/xml.lite/tests/MinidomParserTest2.cpp @@ -52,7 +52,7 @@ int main(int argc, char **argv) { if (argc != 5) { - throw Exception(Ctxt(FmtX( + throw Exception(Ctxt(str::Format( "Usage: %s [OPTION] \n\n\t-a\tadd service\n\t-s\tsubtract service\n\t-o\toutput file\n", argv[0]))); } @@ -123,7 +123,7 @@ int main(int argc, char **argv) if (rootElement) rootElement->print(out); break; default: - throw Exception(Ctxt(FmtX( + throw Exception(Ctxt(str::Format( "Usage: %s [OPTION] \n\n\t-a\tadd service\n\t-s\tsubtract service\n\t-o\toutput file\n", argv[0]))); } diff --git a/externals/coda-oss/modules/c++/xml.lite/tests/XMLReaderTest.cpp b/externals/coda-oss/modules/c++/xml.lite/tests/XMLReaderTest.cpp index 8e4cf9a080..83989cb4a1 100644 --- a/externals/coda-oss/modules/c++/xml.lite/tests/XMLReaderTest.cpp +++ b/externals/coda-oss/modules/c++/xml.lite/tests/XMLReaderTest.cpp @@ -134,7 +134,7 @@ int main(int argc, char **argv) { // Check to make sure we have right length if (argc != 2) - throw Exception(Ctxt(FmtX("Usage: %s \n", argv[0]))); + throw Exception(Ctxt(str::Format("Usage: %s \n", argv[0]))); // Create an input stream FileInputStream diff --git a/externals/nitro/.gitattributes b/externals/nitro/.gitattributes index 6e07f483bd..803f17ffe9 100644 --- a/externals/nitro/.gitattributes +++ b/externals/nitro/.gitattributes @@ -18,10 +18,12 @@ CMakeLists.txt text eol=lf # Text file formats *.txt text eol=lf +*.text text eol=lf *.md text eol=lf *.tex text eol=lf *.?ml text eol=lf *.kmz binary +*.log text eol=lf # Programming languages *.htm? text eol=lf @@ -54,12 +56,21 @@ CMakeLists.txt text eol=lf ###################### # Known binary files +# executables, libraries; yes, sometimes they're part of a repository +*.exe binary +*.out binary +lib*.so* binary +*.dll binary +lib*.a* binary +*.lib binary + # from various unit_test/ directories *.dat binary *.*hdr binary *.flat binary *.sig binary *.bin binary +*.dump binary # images *.bmp binary diff --git a/six/modules/c++/cphd03/tests/cphd_extract_xml.cpp b/six/modules/c++/cphd03/tests/cphd_extract_xml.cpp index 47283206c3..797df10470 100644 --- a/six/modules/c++/cphd03/tests/cphd_extract_xml.cpp +++ b/six/modules/c++/cphd03/tests/cphd_extract_xml.cpp @@ -64,14 +64,14 @@ int main(int argc, char** argv) return 0; } - catch (const std::exception& ex) + catch (const except::Exception& ex) { - std::cerr << ex.what() << std::endl; + std::cerr << ex.toString() << std::endl; return 1; } - catch (const except::Exception& ex) + catch (const std::exception& ex) { - std::cerr << ex.toString() << std::endl; + std::cerr << ex.what() << std::endl; return 1; } catch (...) diff --git a/six/modules/c++/cphd03/tests/print_cphd_header.cpp b/six/modules/c++/cphd03/tests/print_cphd_header.cpp index f57bc76dc0..698fcedde9 100644 --- a/six/modules/c++/cphd03/tests/print_cphd_header.cpp +++ b/six/modules/c++/cphd03/tests/print_cphd_header.cpp @@ -60,14 +60,14 @@ int main(int argc, char** argv) return 0; } - catch (const std::exception& ex) + catch (const except::Exception& ex) { - std::cerr << ex.what() << std::endl; + std::cerr << ex.toString() << std::endl; return 1; } - catch (const except::Exception& ex) + catch (const std::exception& ex) { - std::cerr << ex.toString() << std::endl; + std::cerr << ex.what() << std::endl; return 1; } catch (...) diff --git a/six/modules/c++/cphd03/tests/test_cphd_compare.cpp b/six/modules/c++/cphd03/tests/test_cphd_compare.cpp index c4e965c533..e9d4e1831d 100644 --- a/six/modules/c++/cphd03/tests/test_cphd_compare.cpp +++ b/six/modules/c++/cphd03/tests/test_cphd_compare.cpp @@ -214,14 +214,14 @@ int main(int argc, char** argv) return 0; } - catch (const std::exception& ex) + catch (const except::Exception& ex) { - std::cerr << ex.what() << std::endl; + std::cerr << ex.toString() << std::endl; return 1; } - catch (const except::Exception& ex) + catch (const std::exception& ex) { - std::cerr << ex.toString() << std::endl; + std::cerr << ex.what() << std::endl; return 1; } catch (...) diff --git a/six/modules/c++/cphd03/tests/test_cphd_round_trip.cpp b/six/modules/c++/cphd03/tests/test_cphd_round_trip.cpp index 45e04f4f8c..48463db2d1 100644 --- a/six/modules/c++/cphd03/tests/test_cphd_round_trip.cpp +++ b/six/modules/c++/cphd03/tests/test_cphd_round_trip.cpp @@ -100,14 +100,14 @@ int main(int argc, char** argv) return 0; } - catch (const std::exception& ex) + catch (const except::Exception& ex) { - std::cerr << ex.what() << std::endl; + std::cerr << ex.toString() << std::endl; return 1; } - catch (const except::Exception& ex) + catch (const std::exception& ex) { - std::cerr << ex.toString() << std::endl; + std::cerr << ex.what() << std::endl; return 1; } catch (...) diff --git a/six/modules/c++/cphd03/tests/test_cphd_write_simple.cpp b/six/modules/c++/cphd03/tests/test_cphd_write_simple.cpp index b363f3ad1b..078fb18121 100644 --- a/six/modules/c++/cphd03/tests/test_cphd_write_simple.cpp +++ b/six/modules/c++/cphd03/tests/test_cphd_write_simple.cpp @@ -139,14 +139,14 @@ int main(int argc, char** argv) return 0; } - catch (const std::exception& ex) + catch (const except::Exception& ex) { - std::cerr << ex.what() << std::endl; + std::cerr << ex.toString() << std::endl; return 1; } - catch (const except::Exception& ex) + catch (const std::exception& ex) { - std::cerr << ex.toString() << std::endl; + std::cerr << ex.what() << std::endl; return 1; } catch (...) diff --git a/six/modules/c++/samples/check_valid_six.cpp b/six/modules/c++/samples/check_valid_six.cpp index 0a9c287528..c1f7e6ea4a 100644 --- a/six/modules/c++/samples/check_valid_six.cpp +++ b/six/modules/c++/samples/check_valid_six.cpp @@ -261,15 +261,15 @@ int main(int argc, char** argv) { return main_(argc, argv); } - catch (const std::exception& ex) - { - std::cerr << ex.what() << std::endl; - } catch (const except::Exception& ex) { std::cerr << ex.toString() << std::endl; return 1; } + catch (const std::exception& ex) + { + std::cerr << ex.what() << std::endl; + } catch (...) { std::cerr << "Unknown exception\n"; diff --git a/six/modules/c++/samples/crop_sicd.cpp b/six/modules/c++/samples/crop_sicd.cpp index 75939a7008..ec5a2ffcbb 100644 --- a/six/modules/c++/samples/crop_sicd.cpp +++ b/six/modules/c++/samples/crop_sicd.cpp @@ -190,14 +190,14 @@ int main(int argc, char** argv) return 0; } - catch (const std::exception& ex) + catch (const except::Exception& ex) { - std::cerr << ex.what() << std::endl; + std::cerr << ex.toString() << std::endl; return 1; } - catch (const except::Exception& ex) + catch (const std::exception& ex) { - std::cerr << ex.toString() << std::endl; + std::cerr << ex.what() << std::endl; return 1; } catch (...) diff --git a/six/modules/c++/samples/crop_sidd.cpp b/six/modules/c++/samples/crop_sidd.cpp index 1593775b25..dfb0e8dd70 100644 --- a/six/modules/c++/samples/crop_sidd.cpp +++ b/six/modules/c++/samples/crop_sidd.cpp @@ -79,14 +79,14 @@ int main(int argc, char** argv) aoiDims, outPathname); } - catch (const std::exception& ex) + catch (const except::Exception& ex) { - std::cerr << ex.what() << std::endl; + std::cerr << ex.toString() << std::endl; return 1; } - catch (const except::Exception& ex) + catch (const std::exception& ex) { - std::cerr << ex.toString() << std::endl; + std::cerr << ex.what() << std::endl; return 1; } catch (...) diff --git a/six/modules/c++/samples/round_trip_six.cpp b/six/modules/c++/samples/round_trip_six.cpp index 727f4f926e..94bb7301c7 100644 --- a/six/modules/c++/samples/round_trip_six.cpp +++ b/six/modules/c++/samples/round_trip_six.cpp @@ -386,14 +386,14 @@ int main(int argc, char** argv) writer.setLogger(log); writer.save(buffers.get(), outputFile, schemaPaths); } - catch (const std::exception& ex) + catch (const except::Exception& ex) { - std::cerr << ex.what() << std::endl; + std::cerr << ex.toString() << std::endl; return 1; } - catch (const except::Exception& ex) + catch (const std::exception& ex) { - std::cerr << ex.toString() << std::endl; + std::cerr << ex.what() << std::endl; return 1; } catch (...) diff --git a/six/modules/c++/samples/test_compare_sidd.cpp b/six/modules/c++/samples/test_compare_sidd.cpp index 5016989685..e8f1b668ed 100644 --- a/six/modules/c++/samples/test_compare_sidd.cpp +++ b/six/modules/c++/samples/test_compare_sidd.cpp @@ -213,14 +213,14 @@ int main(int argc, char* argv[]) return 1; } } - catch (const std::exception& exception) + catch (const except::Throwable& exception) { - std::cerr << exception.what() << std::endl; + std::cerr << exception.toString() << std::endl; return 1; } - catch (const except::Throwable& exception) + catch (const std::exception& exception) { - std::cerr << exception.toString() << std::endl; + std::cerr << exception.what() << std::endl; return 1; } catch (...) diff --git a/six/modules/c++/samples/test_create_sicd.cpp b/six/modules/c++/samples/test_create_sicd.cpp index 3f7f416719..014be265e9 100644 --- a/six/modules/c++/samples/test_create_sicd.cpp +++ b/six/modules/c++/samples/test_create_sicd.cpp @@ -284,17 +284,17 @@ int main(int argc, char** argv) return 0; } - catch (const std::exception& ex) - { - std::cerr << "Caught std::exception: " << ex.what() << std::endl; - return 1; - } catch (const except::Exception& ex) { std::cerr << "Caught except::Exception: " << ex.getMessage() << std::endl; return 1; } + catch (const std::exception& ex) + { + std::cerr << "Caught std::exception: " << ex.what() << std::endl; + return 1; + } catch (...) { std::cerr << "Caught unknown exception\n"; diff --git a/six/modules/c++/samples/test_create_sicd_from_mem.cpp b/six/modules/c++/samples/test_create_sicd_from_mem.cpp index f4c2dc6b29..1f5c800ca0 100644 --- a/six/modules/c++/samples/test_create_sicd_from_mem.cpp +++ b/six/modules/c++/samples/test_create_sicd_from_mem.cpp @@ -126,15 +126,15 @@ int main(int argc, char** argv) return 0; } - catch (const std::exception& ex) - { - std::cerr << "Caught std::exception: " << ex.what() << std::endl; - } catch (const except::Exception& ex) { std::cerr << "Caught except::Exception: " << ex.getMessage() << std::endl; } + catch (const std::exception& ex) + { + std::cerr << "Caught std::exception: " << ex.what() << std::endl; + } catch (...) { std::cerr << "Caught unknown exception\n"; diff --git a/six/modules/c++/samples/test_create_sidd_with_compressed_byte_provider.cpp b/six/modules/c++/samples/test_create_sidd_with_compressed_byte_provider.cpp index 25e10181a4..4cbcd4c39a 100644 --- a/six/modules/c++/samples/test_create_sidd_with_compressed_byte_provider.cpp +++ b/six/modules/c++/samples/test_create_sidd_with_compressed_byte_provider.cpp @@ -1121,14 +1121,14 @@ int main(int argc, char **argv) return 1; } - catch (const std::exception& ex) + catch (const except::Throwable& t) { - std::cerr << "Caught std::exception: " << ex.what() << std::endl; + std::cerr << "Caught throwable: " << t.toString() << std::endl; return 1; } - catch (const except::Throwable& t) + catch (const std::exception& ex) { - std::cerr << "Caught throwable: " << t.toString() << std::endl; + std::cerr << "Caught std::exception: " << ex.what() << std::endl; return 1; } catch (...) diff --git a/six/modules/c++/samples/test_image_to_scene.cpp b/six/modules/c++/samples/test_image_to_scene.cpp index 4cd7fe9d59..820692e00c 100644 --- a/six/modules/c++/samples/test_image_to_scene.cpp +++ b/six/modules/c++/samples/test_image_to_scene.cpp @@ -164,14 +164,14 @@ int main(int argc, char** argv) return 0; } - catch (const std::exception& ex) + catch (const except::Exception& ex) { - std::cerr << ex.what() << std::endl; + std::cerr << ex.toString() << std::endl; return 1; } - catch (const except::Exception& ex) + catch (const std::exception& ex) { - std::cerr << ex.toString() << std::endl; + std::cerr << ex.what() << std::endl; return 1; } catch (...) diff --git a/six/modules/c++/samples/test_six_xml_parsing.cpp b/six/modules/c++/samples/test_six_xml_parsing.cpp index 81067a7f45..ca27fe7cf6 100644 --- a/six/modules/c++/samples/test_six_xml_parsing.cpp +++ b/six/modules/c++/samples/test_six_xml_parsing.cpp @@ -160,17 +160,17 @@ int main(int argc, char** argv) return 0; } - catch (const std::exception& ex) - { - std::cerr << "Caught std::exception: " << ex.what() << std::endl; - return 1; - } catch (const except::Exception& ex) { std::cerr << "Caught except::exception: " << ex.getMessage() << std::endl; return 1; } + catch (const std::exception& ex) + { + std::cerr << "Caught std::exception: " << ex.what() << std::endl; + return 1; + } catch (...) { std::cerr << "Caught unknown exception\n"; diff --git a/six/modules/c++/six.sicd/tests/test_sicd_byte_provider.cpp b/six/modules/c++/six.sicd/tests/test_sicd_byte_provider.cpp index 29613f5730..dcec1e5ada 100644 --- a/six/modules/c++/six.sicd/tests/test_sicd_byte_provider.cpp +++ b/six/modules/c++/six.sicd/tests/test_sicd_byte_provider.cpp @@ -410,15 +410,15 @@ int main(int /*argc*/, char** /*argv*/) return (success ? 0 : 1); } - catch (const std::exception& ex) + catch (const except::Exception& ex) { - std::cerr << "Caught std::exception: " << ex.what() << std::endl; + std::cerr << "Caught except::Exception: " << ex.getMessage() + << std::endl; return 1; } - catch (const except::Exception& ex) + catch (const std::exception& ex) { - std::cerr << "Caught except::Exception: " << ex.getMessage() - << std::endl; + std::cerr << "Caught std::exception: " << ex.what() << std::endl; return 1; } catch (...) diff --git a/six/modules/c++/six.sicd/tests/test_streaming_write.cpp b/six/modules/c++/six.sicd/tests/test_streaming_write.cpp index 429e32e5de..08634c817d 100644 --- a/six/modules/c++/six.sicd/tests/test_streaming_write.cpp +++ b/six/modules/c++/six.sicd/tests/test_streaming_write.cpp @@ -539,15 +539,15 @@ int main(int /*argc*/, char** /*argv*/) return (success ? 0 : 1); } - catch (const std::exception& ex) + catch (const except::Exception& ex) { - std::cerr << "Caught std::exception: " << ex.what() << std::endl; + std::cerr << "Caught except::Exception: " << ex.getMessage() + << std::endl; return 1; } - catch (const except::Exception& ex) + catch (const std::exception& ex) { - std::cerr << "Caught except::Exception: " << ex.getMessage() - << std::endl; + std::cerr << "Caught std::exception: " << ex.what() << std::endl; return 1; } catch (...) diff --git a/six/modules/c++/six.sidd/tests/test_read_and_write_lut.cpp b/six/modules/c++/six.sidd/tests/test_read_and_write_lut.cpp index aab4deb5b0..dd10999369 100644 --- a/six/modules/c++/six.sidd/tests/test_read_and_write_lut.cpp +++ b/six/modules/c++/six.sidd/tests/test_read_and_write_lut.cpp @@ -224,14 +224,14 @@ int main(int argc, char** argv) std::cout << "Round-trip succeeded\n"; return 0; } - catch (const std::exception& e) + catch (const except::Exception& e) { - std::cerr << e.what() << std::endl; + std::cerr << e.getMessage() << std::endl; return 1; } - catch (const except::Exception& e) + catch (const std::exception& e) { - std::cerr << e.getMessage() << std::endl; + std::cerr << e.what() << std::endl; return 1; } catch (...) diff --git a/six/modules/c++/six.sidd/tests/test_sidd_byte_provider.cpp b/six/modules/c++/six.sidd/tests/test_sidd_byte_provider.cpp index 3b26b26ff8..60702a49fd 100644 --- a/six/modules/c++/six.sidd/tests/test_sidd_byte_provider.cpp +++ b/six/modules/c++/six.sidd/tests/test_sidd_byte_provider.cpp @@ -789,15 +789,15 @@ int main(int /*argc*/, char** /*argv*/) return (success ? 0 : 1); } - catch (const std::exception& ex) + catch (const except::Exception& ex) { - std::cerr << "Caught std::exception: " << ex.what() << std::endl; + std::cerr << "Caught except::Exception: " << ex.getMessage() + << std::endl; return 1; } - catch (const except::Exception& ex) + catch (const std::exception& ex) { - std::cerr << "Caught except::Exception: " << ex.getMessage() - << std::endl; + std::cerr << "Caught std::exception: " << ex.what() << std::endl; return 1; } catch (...) diff --git a/six/modules/c++/six/tests/test_determine_data_type.cpp b/six/modules/c++/six/tests/test_determine_data_type.cpp index 04473adca8..244a621c11 100644 --- a/six/modules/c++/six/tests/test_determine_data_type.cpp +++ b/six/modules/c++/six/tests/test_determine_data_type.cpp @@ -73,14 +73,14 @@ int main(int argc, char** argv) return 0; } - catch (const std::exception& ex) + catch (const except::Exception& ex) { - std::cerr << ex.what() << std::endl; + std::cerr << ex.toString() << std::endl; return 1; } - catch (const except::Exception& ex) + catch (const std::exception& ex) { - std::cerr << ex.toString() << std::endl; + std::cerr << ex.what() << std::endl; return 1; } catch (...)