better constraint failure reporting

diff --git a/tests/19-param-OK.asn1.-P b/tests/19-param-OK.asn1.-P
index b98d1ed..c40c439 100644
--- a/tests/19-param-OK.asn1.-P
+++ b/tests/19-param-OK.asn1.-P
@@ -261,7 +261,8 @@
 	
 	if(!sptr) {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: value not given", td->name);
+			"%s: value not given (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 	
@@ -271,7 +272,8 @@
 		return 0;
 	} else {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: constraint failed", td->name);
+			"%s: constraint failed (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 }
diff --git a/tests/42-real-life-OK.asn1.-PR b/tests/42-real-life-OK.asn1.-PR
index a934fff..ad954aa 100644
--- a/tests/42-real-life-OK.asn1.-PR
+++ b/tests/42-real-life-OK.asn1.-PR
@@ -40,7 +40,8 @@
 	
 	if(!sptr) {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: value not given", td->name);
+			"%s: value not given (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 	
@@ -55,7 +56,8 @@
 		return 0;
 	} else {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: constraint failed", td->name);
+			"%s: constraint failed (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 }
@@ -187,7 +189,8 @@
 	
 	if(!sptr) {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: value not given", td->name);
+			"%s: value not given (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 	
@@ -347,7 +350,8 @@
 	
 	if(!sptr) {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: value not given", td->name);
+			"%s: value not given (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 	
@@ -362,7 +366,8 @@
 		return 0;
 	} else {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: constraint failed", td->name);
+			"%s: constraint failed (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 }
diff --git a/tests/50-constraint-OK.asn1.-P b/tests/50-constraint-OK.asn1.-P
index 757b1d6..059f64e 100644
--- a/tests/50-constraint-OK.asn1.-P
+++ b/tests/50-constraint-OK.asn1.-P
@@ -128,13 +128,15 @@
 	
 	if(!sptr) {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: value not given", td->name);
+			"%s: value not given (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 	
 	if(asn1_INTEGER2long(st, &value)) {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: value too large", td->name);
+			"%s: value too large (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 	
@@ -143,7 +145,8 @@
 		return 0;
 	} else {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: constraint failed", td->name);
+			"%s: constraint failed (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 }
@@ -247,13 +250,15 @@
 	
 	if(!sptr) {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: value not given", td->name);
+			"%s: value not given (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 	
 	if(asn1_INTEGER2long(st, &value)) {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: value too large", td->name);
+			"%s: value too large (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 	
@@ -262,7 +267,8 @@
 		return 0;
 	} else {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: constraint failed", td->name);
+			"%s: constraint failed (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 }
@@ -365,7 +371,8 @@
 	
 	if(!sptr) {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: value not given", td->name);
+			"%s: value not given (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 	
@@ -479,13 +486,15 @@
 	
 	if(!sptr) {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: value not given", td->name);
+			"%s: value not given (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 	
 	if(asn1_INTEGER2long(st, &value)) {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: value too large", td->name);
+			"%s: value too large (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 	
@@ -494,7 +503,8 @@
 		return 0;
 	} else {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: constraint failed", td->name);
+			"%s: constraint failed (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 }
@@ -597,7 +607,8 @@
 	
 	if(!sptr) {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: value not given", td->name);
+			"%s: value not given (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 	
@@ -827,7 +838,8 @@
 	
 	if(!sptr) {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: value not given", td->name);
+			"%s: value not given (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 	
@@ -839,7 +851,8 @@
 		return 0;
 	} else {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: constraint failed", td->name);
+			"%s: constraint failed (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 }
@@ -970,7 +983,8 @@
 	
 	if(!sptr) {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: value not given", td->name);
+			"%s: value not given (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 	
@@ -982,7 +996,8 @@
 		return 0;
 	} else {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: constraint failed", td->name);
+			"%s: constraint failed (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 }
@@ -1101,7 +1116,8 @@
 	
 	if(!sptr) {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: value not given", td->name);
+			"%s: value not given (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 	
@@ -1111,7 +1127,8 @@
 		return 0;
 	} else {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: constraint failed", td->name);
+			"%s: constraint failed (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 }
@@ -1230,7 +1247,8 @@
 	
 	if(!sptr) {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: value not given", td->name);
+			"%s: value not given (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 	
@@ -1240,7 +1258,8 @@
 		return 0;
 	} else {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: constraint failed", td->name);
+			"%s: constraint failed (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 }
@@ -1359,7 +1378,8 @@
 	
 	if(!sptr) {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: value not given", td->name);
+			"%s: value not given (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 	
@@ -1369,7 +1389,8 @@
 		return 0;
 	} else {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: constraint failed", td->name);
+			"%s: constraint failed (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 }
@@ -1472,7 +1493,8 @@
 	
 	if(!sptr) {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: value not given", td->name);
+			"%s: value not given (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 	
@@ -1585,7 +1607,8 @@
 	
 	if(!sptr) {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: value not given", td->name);
+			"%s: value not given (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 	
@@ -1715,7 +1738,8 @@
 	
 	if(!sptr) {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: value not given", td->name);
+			"%s: value not given (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 	
@@ -1727,7 +1751,8 @@
 		return 0;
 	} else {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: constraint failed", td->name);
+			"%s: constraint failed (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 }
@@ -1847,7 +1872,8 @@
 	
 	if(!sptr) {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: value not given", td->name);
+			"%s: value not given (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 	
@@ -1859,7 +1885,8 @@
 		return 0;
 	} else {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: constraint failed", td->name);
+			"%s: constraint failed (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 }
@@ -1978,7 +2005,8 @@
 	
 	if(!sptr) {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: value not given", td->name);
+			"%s: value not given (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 	
@@ -1988,7 +2016,8 @@
 		return 0;
 	} else {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: constraint failed", td->name);
+			"%s: constraint failed (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 }
@@ -2121,7 +2150,8 @@
 	
 	if(!sptr) {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: value not given", td->name);
+			"%s: value not given (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 	
@@ -2134,7 +2164,8 @@
 		return 0;
 	} else {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: constraint failed", td->name);
+			"%s: constraint failed (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 }
@@ -2238,7 +2269,8 @@
 	
 	if(!sptr) {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: value not given", td->name);
+			"%s: value not given (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 	
@@ -2250,7 +2282,8 @@
 		return 0;
 	} else {
 		_ASN_ERRLOG(app_errlog, app_key,
-			"%s: constraint failed", td->name);
+			"%s: constraint failed (%s:%d)",
+			td->name, __FILE__, __LINE__);
 		return -1;
 	}
 }