* doesn't exist.
*/
p = strchr(name, '.');
- if (!p) return NULL;
+ if (!p) {
+ if (!mi) {
+ fr_strerror_printf("No such module '%s'", name);
+
+ } else if (method_name2) {
+ fr_strerror_printf("Module '%s' does not have a '%s %s' method", name, method_name1, method_name2);
+
+ } else {
+ fr_strerror_printf("Module '%s' does not have a '%s' method", name, method_name1);
+ }
+ return NULL;
+ }
/*
* The module name may have a '.' in it, AND it may have
* No such module, we're done.
*/
if (!mi) {
+ fr_strerror_printf("Failed to find module '%s'", inst_name);
talloc_free(inst_name);
return NULL;
}
* component.
*/
if (!method) {
- if (unlang_ctx->section_name1 && unlang_ctx->section_name2) {
- cf_log_err(ci, "The \"%s\" module does not have a '%s %s' method.",
- inst->module->name,
- unlang_ctx->section_name1, unlang_ctx->section_name2);
-
- } else if (!unlang_ctx->section_name1) {
- cf_log_err(ci, "The \"%s\" module cannot be called as '%s'.",
- inst->module->name, realname);
-
- } else {
- cf_log_err(ci, "The \"%s\" module does not have a '%s' method.",
- inst->module->name,
- unlang_ctx->section_name1);
- }
-
+ cf_log_err(ci, "Failed compiling %s - %s", inst->module->name, fr_strerror());
return NULL;
}
* named method.
*/
if (!unlang_ctx2.section_name1) {
- cf_log_err(ci, "The '%s' module does not have a '%s %s' method.",
- name, unlang_ctx->section_name1,
- unlang_ctx->section_name2 ? unlang_ctx->section_name2 : "");
+ cf_log_err(ci, "Failed compiling %s - %s", name, fr_strerror());
return NULL;
}