diff --git a/src/lib/error.h b/src/lib/error.h index 7c8806dcd..abc2d151a 100644 --- a/src/lib/error.h +++ b/src/lib/error.h @@ -24,7 +24,7 @@ #include #include -#define CINELERRA_DIE(message) do { NOBUG_ERROR(NOBUG_ON, message); abort(); } while(0) +#define CINELERRA_DIE do { NOBUG_ERROR(NOBUG_ON, "Fatal Error!"); abort(); } while(0) #define CINELERRA_ERROR_DECLARE(err) \ extern const char* CINELERRA_ERROR_##err diff --git a/src/lib/plugin.c b/src/lib/plugin.c index f565c6331..4005bb204 100644 --- a/src/lib/plugin.c +++ b/src/lib/plugin.c @@ -140,7 +140,7 @@ cinelerra_plugin_lookup (struct cinelerra_plugin* self, const char* path) /* got it */ TRACE (cinelerra_plugin, "found %s", pathname); self->pathname = strdup (pathname); - if (!self->pathname) CINELERRA_DIE("out of memory"); + if (!self->pathname) CINELERRA_DIE; self->type = cinelerra_plugin_extensions[i].type; return 0; } @@ -163,7 +163,7 @@ cinelerra_interface_open (const char* name, const char* interface, size_t min_re plugin.name = name; /* for searching */ found = tsearch (&plugin, &cinelerra_plugin_registry, cinelerra_plugin_name_cmp); - if (!found) CINELERRA_DIE("out of memory"); + if (!found) CINELERRA_DIE; if (*found == &plugin) { @@ -171,13 +171,13 @@ cinelerra_interface_open (const char* name, const char* interface, size_t min_re /* now really create new item */ *found = malloc (sizeof (struct cinelerra_plugin)); - if (!*found) CINELERRA_DIE("out of memory"); + if (!*found) CINELERRA_DIE; if (name) /* NULL is main app, no lookup needed */ { /*lookup for $CINELERRA_PLUGIN_PATH*/ (*found)->name = strdup (name); - if (!(*found)->name) CINELERRA_DIE("out of memory"); + if (!(*found)->name) CINELERRA_DIE; if (!!cinelerra_plugin_lookup (*found, getenv("CINELERRA_PLUGIN_PATH")) #ifdef CINELERRA_PLUGIN_PATH diff --git a/tests/examples/plugin_main.c b/tests/examples/plugin_main.c index 70180dffa..47304c242 100644 --- a/tests/examples/plugin_main.c +++ b/tests/examples/plugin_main.c @@ -21,7 +21,7 @@ main(int argc, char** argv) CINELERRA_INTERFACE_TYPE(hello, 1)* hello_de = (CINELERRA_INTERFACE_TYPE(hello, 1)*) cinelerra_interface_open ("example_plugin", "german_1", sizeof(CINELERRA_INTERFACE_TYPE(hello, 1))); - if (!hello_de) CINELERRA_DIE("loading plugin failed"); + if (!hello_de) CINELERRA_DIE; hello_de->hello(); @@ -29,7 +29,7 @@ main(int argc, char** argv) CINELERRA_INTERFACE_TYPE(hello, 1)* hello_en = (CINELERRA_INTERFACE_TYPE(hello, 1)*) cinelerra_interface_open ("example_plugin", "english_1", sizeof(CINELERRA_INTERFACE_TYPE(hello, 1))); - if (!hello_en) CINELERRA_DIE("loading plugin failed"); + if (!hello_en) CINELERRA_DIE; hello_en->hello();