Make die string in controller much better
[catagits/Gitalist.git] / lib / Gitalist / Controller / Fragment.pm
index 15c4511..3082b0c 100644 (file)
@@ -3,9 +3,9 @@ package Gitalist::Controller::Fragment;
 use Moose;
 use namespace::autoclean;
 
-BEGIN { extends 'Catalyst::Controller' }
+BEGIN { extends 'Gitalist::Controller' }
 
-sub base : Chained('/root') PathPart('fragment') CaptureArgs(0) {
+sub base : Chained('/base') PathPart('fragment') CaptureArgs(0) {
     my ($self, $c) = @_;
     $c->stash(no_wrapper => 1);
 }
@@ -13,7 +13,7 @@ sub base : Chained('/root') PathPart('fragment') CaptureArgs(0) {
 sub collectionofrepositories : Chained('base') Args(0) {
     my ($self, $c) = @_;
     my @list = @{ $c->model()->repositories };
-    die 'No repositories found in '. $c->model->repo_dir
+    die 'No repositories found in '. ref($c->model) . ' ' . $c->model->debug_string
       unless @list;
 
     my $search = $c->req->param('s') || '';