Skip to content

Commit

Permalink
improve error messages when loading module and config file
Browse files Browse the repository at this point in the history
  • Loading branch information
MARTIMM committed Aug 1, 2017
1 parent 886cd34 commit 12508e5
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/Config/DataLang/Refine.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,23 @@ class Config::DataLang::Refine:auth<github:MARTIMM> {
$!config-content = slurp($locs[0]);
try {
require ::($!data-module);
$!config = &$!read-from-text($!config-content);

CATCH {
default {
say "Failed to load $!data-module;\n$!";
}
}
}

try {
$!config = &$!read-from-text($!config-content);

CATCH {
default {
note .message;
}
}
}
}
}

Expand Down

0 comments on commit 12508e5

Please sign in to comment.