Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Do eval in calling get_vrule in summarize_vrule

  • Loading branch information...
commit 7987706b73b45022e1a2b345fb7a5fab967c19b7 1 parent ad02485
hirose31 hirose31 authored
Showing with 9 additions and 1 deletion.
  1. +9 −1 lib/GrowthForecast/Web.pm
10 lib/GrowthForecast/Web.pm
View
@@ -1272,7 +1272,15 @@ sub summarize_vrule {
my $graph_path = '/'.join('/', $c->args->{service_name}||(), $c->args->{section_name}||(), $c->args->{graph_name}||());
- my @vrules = $self->data->get_vrule($result->valid('t'), $result->valid('from'), $result->valid('to'), $graph_path);
+ my @vrules;
+ eval {
+ @vrules = $self->data->get_vrule($result->valid('t'), $result->valid('from'), $result->valid('to'), $graph_path);
+ };
+ if ( $@ ) {
+ die sprintf "Error:%s %s/%s/%s => %s,%s,%s",
+ $@, $c->args->{service_name}, $c->args->{section_name}, $c->args->{graph_name},
+ $result->valid('t'), $result->valid('from') , $result->valid('to');
+ }
$c->render_json(\@vrules);
};
Please sign in to comment.
Something went wrong with that request. Please try again.