Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Use carp to get useful errors

  • Loading branch information...
commit 67dcbfcbca587f77e0d264b4ed713e10c720ed7d 1 parent cbc94af
Eskild Hustvedt zerodogg authored

Showing 1 changed file with 3 additions and 2 deletions. Show diff stats Hide diff stats

  1. +3 2 lib/LIXUZ/HelperModules/Files.pm
5 lib/LIXUZ/HelperModules/Files.pm
@@ -56,6 +56,7 @@ use Exporter qw(import);
56 56 use File::stat;
57 57 use IO::File ();
58 58 use LIXUZ::HelperModules::Cache qw(get_ckey CT_24H);
  59 +use Carp qw(croak);
59 60
60 61 our @EXPORT_OK = qw(lixuz_serve_static_file lixuz_serve_scalar_file get_new_aspect fsize);
61 62
@@ -146,12 +147,12 @@ sub get_new_aspect
146 147 }
147 148 if ((not defined $oldVal or $oldVal == 0) || (not defined $newVal or $newVal == 0))
148 149 {
149   - die("oldVal or newVal is zero");
  150 + croak("oldVal or newVal is zero");
150 151 }
151 152 $percentage_change = $oldVal/$newVal;
152 153 if ($changeVal == 0 || $percentage_change == 0)
153 154 {
154   - die("changeVal or percentage_change is zero");
  155 + croak("changeVal or percentage_change is zero");
155 156 }
156 157 return sprintf('%d',$changeVal / $percentage_change );
157 158 }

0 comments on commit 67dcbfc

Please sign in to comment.
Something went wrong with that request. Please try again.