diff --git a/Changes b/Changes index 468824407..12de035fd 100644 --- a/Changes +++ b/Changes @@ -6,6 +6,7 @@ [ ENHANCEMENTS ] [ DOCUMENTATION ] + * GH #1669: Show correct usage of Dancer2::Core::Error (GeekRuthie) * GH #1674: Fix POD for input_handle() (mauke) 0.400001 2023-02-05 18:41:48-05:00 America/New_York diff --git a/lib/Dancer2.pm b/lib/Dancer2.pm index 61b84fc46..241ad4edc 100644 --- a/lib/Dancer2.pm +++ b/lib/Dancer2.pm @@ -307,6 +307,7 @@ We are also on IRC: #dancer on irc.perl.org. Fayland Lam ferki Gabor Szabo + GeekRuthie geistteufel Gideon D'souza Gil Magno diff --git a/lib/Dancer2/Core/Error.pm b/lib/Dancer2/Core/Error.pm index 840a44fdd..272fee089 100644 --- a/lib/Dancer2/Core/Error.pm +++ b/lib/Dancer2/Core/Error.pm @@ -475,7 +475,6 @@ __END__ =head1 SYNOPSIS - # taken from send_file: use Dancer2::Core::Error; my $error = Dancer2::Core::Error->new( @@ -483,7 +482,7 @@ __END__ message => "No such file: `$path'" ); - Dancer2::Core::Response->set($error->render); + $error->throw; =head1 DESCRIPTION