]> www.ginac.de Git - ginac.git/commitdiff
synced to 1.1
authorChristian Bauer <Christian.Bauer@uni-mainz.de>
Wed, 22 Jan 2003 20:07:30 +0000 (20:07 +0000)
committerChristian Bauer <Christian.Bauer@uni-mainz.de>
Wed, 22 Jan 2003 20:07:30 +0000 (20:07 +0000)
ginac/idx.cpp

index 82052d88f45d36a17db90129682c5861779b586f..f69613c69065652569bc7adeb524e0f6ac6bf4e7 100644 (file)
@@ -21,6 +21,7 @@
  */
 
 #include <iostream>
+#include <sstream>
 #include <stdexcept>
 
 #include "idx.h"
@@ -546,8 +547,11 @@ ex minimal_dim(const ex & dim1, const ex & dim2)
                return dim1;
        else if (dim1 > dim2 || (is_a<symbol>(dim1) && is_exactly_a<numeric>(dim2)))
                return dim2;
-       else
-               throw (std::runtime_error("minimal_dim(): index dimensions cannot be ordered"));
+       else {
+               std::ostringstream s;
+               s << "minimal_dim(): index dimensions " << dim1 << " and " << dim2 << " cannot be ordered";
+               throw (std::runtime_error(s.str()));
+       }
 }
 
 } // namespace GiNaC