Skip to content

Commit

Permalink
Fix incorrect whitespace-removal logic
Browse files Browse the repository at this point in the history
  • Loading branch information
struanb committed Sep 5, 2023
1 parent bc37a0e commit cdd3feb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/server/lib/Exception.pm
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,17 @@ sub new {
my $class = shift;
my %args = @_;

# Remove leading and/or trailing whitespace
$args{'msg'} =~ s/(^\s+|\s+$)//g;
$args{'dbg'} =~ s/(^\s+|\s+$)//g;

my $self = bless {
'code' => $args{'code'},
'msg' => $args{'msg'},
'dbg' => $args{'dbg'},
'time' => Time::HiRes::time
}, ( ref($class) || $class );

# Remove leading and/or trailing whitespace
$args{'msg'} =~ s/(^\s+|\s+$)//g;
$args{'dbg'} =~ s/(^\s+|\s+$)//g;

return $self;
}

Expand Down

0 comments on commit cdd3feb

Please sign in to comment.