[Gridflow-cvs] [svn] commit: r6337 - /trunk/src/gridflow.hxx

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Fri Sep 24 12:10:09 EDT 2010


Author: matju
Date: Fri Sep 24 12:10:07 2010
New Revision: 6337

Log:
more detailed error messages

Modified:
    trunk/src/gridflow.hxx

Modified: trunk/src/gridflow.hxx
==============================================================================
--- trunk/src/gridflow.hxx (original)
+++ trunk/src/gridflow.hxx Fri Sep 24 12:10:07 2010
@@ -272,7 +272,7 @@
 	operator   int64 () const {if (a_type!=A_FLOAT) RAISE("expected float, got %s",to_s().data()); return  (int64)round(a_float);}
 	operator float64 () const {if (a_type!=A_FLOAT) RAISE("expected float, got %s",to_s().data()); return               a_float ;}
 
-#define TYPECASTER2(T,A,B,C) operator T () const {if (a_type!=A) RAISE("expected "B); return C;}
+#define TYPECASTER2(T,A,B,C) operator T () const {if (a_type!=A) RAISE("expected "B", got %s",to_s().data()); return C;}
 	TYPECASTER2(string      ,A_SYMBOL ,"symbol"     ,string(a_symbol->s_name))
 	//TYPECASTER2(const char *,A_SYMBOL ,"symbol"     ,       a_symbol->s_name ) //"ambiguous" ?
 	TYPECASTER2(t_symbol   *,A_SYMBOL ,"symbol"     ,       a_symbol         )



More information about the Gridflow-cvs mailing list