Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Structured Errors for engine loading #836

Closed
pdl opened this Issue · 0 comments

1 participant

@pdl
pdl commented

In list context, Dancer::ModuleLoader returns an error as well as a result flag.

However, in Dancer::Engine, this useful feature is not used:

    raise core_engine => "unable to load $type engine '$name', "
      . "perhaps you need to install $engine_class?"
      unless Dancer::ModuleLoader->load($engine_class);

Is there a way to fix this?

I guess it's just a matter of somthing like the following, but I don't know if it fits with Dancer's 'style' of handling/nesting errors.

    my ($load_result, $load_error) =  unless Dancer::ModuleLoader->load($engine_class);
    raise core_engine => "unable to load $type engine '$name', "
      . "perhaps you need to install $engine_class?\n"
      .  $load_error unless $load_result;
@yanick yanick referenced this issue from a commit
@yanick yanick display why the loading failed if it does
with the additional tip if the module was not found

Fixes #836
4ad66fc
@yanick yanick referenced this issue
Closed

Detailed error #939

@yanick yanick closed this issue from a commit
@yanick yanick display why the loading failed if it does
with the additional tip if the module was not found

Fixes #836
a41cfbb
@yanick yanick closed this in a41cfbb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.