$prev_year--;
}
-my @cal = calendar($DisplayedMonth, $DisplayedYear);
+my @cal;
+{
+ my $error;
+ # RT defines a __DIE__ and Calendar::Simple uses Carp::Croak to report errors
+ # work around this so we get a better error message if something is out of range
+ eval { local $SIG{__DIE__} = sub { $error = $_[0] }; @cal = calendar($DisplayedMonth, $DisplayedYear) };
+ if ($error) {
+ $RT::Logger->error("error $error");
+ $m->comp('/Elements/Error', Why => $error );
+ }
+}
</%init>
<%args>