aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Williams <andy@andywilliams.me>2017-12-22 11:18:46 +0000
committerAndy Williams <andy@andywilliams.me>2017-12-22 11:18:46 +0000
commit9a4eedb078bde1ea15d80ba2f285f7d2dc672c10 (patch)
treee046528c0aedc098d2c66f3713af644c145c6651
parentdocs: Update efl interface eo files for grammar and readability (diff)
downloadefl-9a4eedb078bde1ea15d80ba2f285f7d2dc672c10.tar.gz
Remove all ocurrences of SPANK from our user facing errors.
This has been bugging me for some time but now we are triggering new errors internally this is appearing to end users for problems they did not cause. Additionally I was able to improve a couple of the errors by copying the explanation from code comments into the error message. Shorter error logs now too :)
-rw-r--r--src/lib/ecore/ecore.c4
-rw-r--r--src/lib/ecore/ecore_exe_posix.c9
-rw-r--r--src/lib/edje/edje_load.c2
-rw-r--r--src/lib/edje/edje_program.c2
-rw-r--r--src/lib/eina/eina_magic.c20
-rw-r--r--src/tests/eina/eina_test_magic.c15
6 files changed, 12 insertions, 40 deletions
diff --git a/src/lib/ecore/ecore.c b/src/lib/ecore/ecore.c
index 26a7481d49..85040f532d 100644
--- a/src/lib/ecore/ecore.c
+++ b/src/lib/ecore/ecore.c
@@ -801,9 +801,7 @@ _ecore_magic_fail(const void *d,
" Supplied: %08x - %s",
(unsigned int)req_m, _ecore_magic_string_get(req_m),
(unsigned int)m, _ecore_magic_string_get(m));
- ERR("*** NAUGHTY PROGRAMMER!!!\n"
- "*** SPANK SPANK SPANK!!!\n"
- "*** Now go fix your code. Tut tut tut!");
+
if (getenv("ECORE_ERROR_ABORT")) abort();
}
diff --git a/src/lib/ecore/ecore_exe_posix.c b/src/lib/ecore/ecore_exe_posix.c
index 2d8fa98983..a9332d1832 100644
--- a/src/lib/ecore/ecore_exe_posix.c
+++ b/src/lib/ecore/ecore_exe_posix.c
@@ -180,9 +180,7 @@ _ecore_exe_check_errno(int result,
case EPERM:
case EBUSY:
{ /* Programmer fucked up. */
- ERR("*** NAUGHTY PROGRAMMER!!!\n"
- "*** SPANK SPANK SPANK!!!\n"
- "*** Now go fix your code in %s @%u. Tut tut tut!",
+ ERR("*** Race condition between open() and dup() created in %s @%u.",
file, line);
result = 0;
break;
@@ -190,10 +188,7 @@ _ecore_exe_check_errno(int result,
default:
{ /* Unsupported errno code, please add this one. */
- ERR("*** NAUGHTY PROGRAMMER!!!\n"
- "*** SPANK SPANK SPANK!!!\n"
- "*** Unsupported errno code %d, please add this one.\n"
- "*** Now go fix your code in %s @%u, from %s @%u. Tut tut tut!",
+ ERR("*** Unsupported errno code %d, found in %s @%u, from %s @%u.",
saved_errno, __FILE__, __LINE__, file, line);
result = 0;
break;
diff --git a/src/lib/edje/edje_load.c b/src/lib/edje/edje_load.c
index 080cca567d..34492c847b 100644
--- a/src/lib/edje/edje_load.c
+++ b/src/lib/edje/edje_load.c
@@ -1072,7 +1072,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
break;
case EDJE_PART_TYPE_GRADIENT:
- ERR("SPANK ! SPANK ! SPANK ! YOU ARE USING GRADIENT IN PART %s FROM GROUP %s INSIDE FILE %s !! THEY ARE NOW REMOVED !",
+ ERR("YOU ARE USING GRADIENT IN PART %s FROM GROUP %s INSIDE FILE %s !! THEY ARE NOW REMOVED !",
ep->name, group, eina_file_filename_get(file));
break;
diff --git a/src/lib/edje/edje_program.c b/src/lib/edje/edje_program.c
index dd6e73c260..1746c7f560 100644
--- a/src/lib/edje/edje_program.c
+++ b/src/lib/edje/edje_program.c
@@ -122,7 +122,7 @@ _edje_emit_child(Edje *ed, Edje_Real_Part *rp, const char *part, const char *sig
break;
default:
- // ERR("SPANK SPANK SPANK !!!\nYou should never be here !");
+ // ERR("Unknown part type. You should never be here!");
break;
}
return ed->collection->broadcast_signal;
diff --git a/src/lib/eina/eina_magic.c b/src/lib/eina/eina_magic.c
index 082e7f4259..c1918419fc 100644
--- a/src/lib/eina/eina_magic.c
+++ b/src/lib/eina/eina_magic.c
@@ -273,32 +273,23 @@ eina_magic_fail(void *d,
eina_log_print(EINA_LOG_DOMAIN_GLOBAL, EINA_LOG_LEVEL_ERR,
file, fnc, line,
"*** Eina Magic Check Failed !!!\n"
- " Input handle pointer is NULL !\n"
- "*** NAUGHTY PROGRAMMER!!!\n"
- "*** SPANK SPANK SPANK!!!\n"
- "*** Now go fix your code. Tut tut tut!\n"
+ " Input handle pointer is NULL.\n"
"\n");
else
if (m == EINA_MAGIC_NONE)
eina_log_print(EINA_LOG_DOMAIN_GLOBAL, EINA_LOG_LEVEL_CRITICAL,
file, fnc, line,
"*** Eina Magic Check Failed at %p !!!\n"
- " Input handle has already been freed!\n"
- "*** NAUGHTY PROGRAMMER!!!\n"
- "*** SPANK SPANK SPANK!!!\n"
- "*** Now go fix your code. Tut tut tut!\n"
+ " Input handle has already been freed.\n"
"\n", d);
else
if (m != req_m)
eina_log_print(EINA_LOG_DOMAIN_GLOBAL, EINA_LOG_LEVEL_CRITICAL,
file, fnc, line,
"*** Eina Magic Check Failed at %p !!!\n"
- " Input handle is wrong type\n"
+ " Input handle is wrong type.\n"
" Expected: %08x - %s\n"
" Supplied: %08x - %s\n"
- "*** NAUGHTY PROGRAMMER!!!\n"
- "*** SPANK SPANK SPANK!!!\n"
- "*** Now go fix your code. Tut tut tut!\n"
"\n",
d, req_m, eina_magic_string_get(req_m),
m, eina_magic_string_get(m));
@@ -306,10 +297,7 @@ eina_magic_fail(void *d,
eina_log_print(EINA_LOG_DOMAIN_GLOBAL, EINA_LOG_LEVEL_CRITICAL,
file, fnc, line,
"*** Eina Magic Check Failed !!!\n"
- " Why did you call me !\n"
- "*** NAUGHTY PROGRAMMER!!!\n"
- "*** SPANK SPANK SPANK!!!\n"
- "*** Now go fix your code. Tut tut tut!\n"
+ " Unknown reason.\n"
"\n");
}
diff --git a/src/tests/eina/eina_test_magic.c b/src/tests/eina/eina_test_magic.c
index b6f8fdc369..14a6f0dd7b 100644
--- a/src/tests/eina/eina_test_magic.c
+++ b/src/tests/eina/eina_test_magic.c
@@ -148,10 +148,7 @@ START_TEST(eina_magic_simple)
#endif
TEST_MAGIC_SAFETY(__FUNCTION__,
"*** Eina Magic Check Failed !!!\n"
- " Input handle pointer is NULL !\n"
- "*** NAUGHTY PROGRAMMER!!!\n"
- "*** SPANK SPANK SPANK!!!\n"
- "*** Now go fix your code. Tut tut tut!\n"
+ " Input handle pointer is NULL.\n"
"\n");
EINA_MAGIC_FAIL(ems, EINA_MAGIC_TEST);
fail_unless(ctx.did);
@@ -169,10 +166,7 @@ START_TEST(eina_magic_simple)
#endif
TEST_MAGIC_SAFETY(__FUNCTION__,
"*** Eina Magic Check Failed at %p !!!\n"
- " Input handle has already been freed!\n"
- "*** NAUGHTY PROGRAMMER!!!\n"
- "*** SPANK SPANK SPANK!!!\n"
- "*** Now go fix your code. Tut tut tut!\n"
+ " Input handle has already been freed.\n"
"\n");
ctx.expected_level = EINA_LOG_LEVEL_CRITICAL;
EINA_MAGIC_FAIL(ems, EINA_MAGIC_TEST);
@@ -184,12 +178,9 @@ START_TEST(eina_magic_simple)
#endif
TEST_MAGIC_SAFETY(__FUNCTION__,
"*** Eina Magic Check Failed at %p !!!\n"
- " Input handle is wrong type\n"
+ " Input handle is wrong type.\n"
" Expected: %08x - %s\n"
" Supplied: %08x - %s\n"
- "*** NAUGHTY PROGRAMMER!!!\n"
- "*** SPANK SPANK SPANK!!!\n"
- "*** Now go fix your code. Tut tut tut!\n"
"\n");
ctx.expected_level = EINA_LOG_LEVEL_CRITICAL;
EINA_MAGIC_FAIL(ems, EINA_MAGIC_TEST);