Skip to content

Commit

Permalink
Item14237: Removed excessive init of text attribute.
Browse files Browse the repository at this point in the history
  • Loading branch information
vrurg committed May 16, 2018
1 parent 5ed2a3d commit a081ccd
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions core/lib/Foswiki/Exception.pm
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ throwing the exception then it must generate it using other attributes.
has text => (
is => 'rwp',
lazy => 1,
builder => 'prepareText',
clearer => 1,
predicate => 1,
builder => 'prepareText',
);

=begin TML
Expand Down Expand Up @@ -159,10 +159,6 @@ sub BUILD {
my ( undef, $file, $line ) = caller;
$this->_set_file($file) unless $this->has_file;
$this->_set_line($line) unless $this->has_line;
$this->_set_text(
ref($this)
. " didn't set a meaningful error text in case it would be treated as a simple Foswiki::Exception"
) unless $this->text;

state $tryLogging = 1;
if ( $tryLogging
Expand Down Expand Up @@ -477,7 +473,7 @@ autogenerated from other exception data.

sub prepareText {
my $this = shift;
return "text attribute hasn't been set";
return "exception text attribute hasn't been set";
}

use Foswiki;
Expand Down

0 comments on commit a081ccd

Please sign in to comment.