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 :)
This commit is contained in:
Andy Williams 2017-12-22 11:18:46 +00:00
parent 77dd065c52
commit 9a4eedb078
6 changed files with 12 additions and 40 deletions

View File

@ -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();
}

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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");
}

View File

@ -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);