[cig-commits] r6471 - cs/spatialdata-0.1/trunk/libsrc/geocoords
brad at geodynamics.org
brad at geodynamics.org
Thu Mar 29 18:21:52 PDT 2007
Author: brad
Date: 2007-03-29 18:21:51 -0700 (Thu, 29 Mar 2007)
New Revision: 6471
Modified:
cs/spatialdata-0.1/trunk/libsrc/geocoords/Converter.cc
Log:
Made error message more verbose.
Modified: cs/spatialdata-0.1/trunk/libsrc/geocoords/Converter.cc
===================================================================
--- cs/spatialdata-0.1/trunk/libsrc/geocoords/Converter.cc 2007-03-30 01:21:18 UTC (rev 6470)
+++ cs/spatialdata-0.1/trunk/libsrc/geocoords/Converter.cc 2007-03-30 01:21:51 UTC (rev 6471)
@@ -46,9 +46,15 @@
if (pCSSrc->csType() != pCSDest->csType())
throw std::runtime_error("Cannot convert between coordinate systems "
"of different types.");
- if (pCSSrc->spaceDim() != pCSDest->spaceDim())
- throw std::runtime_error("Cannot convert between coordinate systems "
- "with different spatial dimensions.");
+ if (pCSSrc->spaceDim() != pCSDest->spaceDim()) {
+ std::ostringstream msg;
+ msg << "Cannot convert between coordinate systems with different "
+ << "spatial dimensions.\n"
+ << "Source and destination coordinate systems have "
+ << pCSSrc->spaceDim() << " and " << pCSDest->spaceDim()
+ << " dimensions, respectively.";
+ throw std::runtime_error(msg.str());
+ } // if
switch (pCSSrc->csType())
{ // switch
More information about the cig-commits
mailing list