[Rt-commit] r19386 - in rt/3.8/trunk: .

sartak at bestpractical.com sartak at bestpractical.com
Thu Apr 30 17:37:16 EDT 2009


Author: sartak
Date: Thu Apr 30 17:37:16 2009
New Revision: 19386

Modified:
   rt/3.8/trunk/   (props changed)
   rt/3.8/trunk/bin/rt-crontool.in

Log:
 r82603 at onn:  sartak | 2009-04-30 17:37:07 -0400
 Throw an error if the template the user provided cannot be loaded


Modified: rt/3.8/trunk/bin/rt-crontool.in
==============================================================================
--- rt/3.8/trunk/bin/rt-crontool.in	(original)
+++ rt/3.8/trunk/bin/rt-crontool.in	Thu Apr 30 17:37:16 2009
@@ -130,7 +130,8 @@
 my $template_obj;
 if ($template_id) {
     $template_obj = RT::Template->new($CurrentUser);
-    $template_obj->Load($template_id);
+    my ($ok, $msg) = $template_obj->Load($template_id);
+    die "Failed to load template '$template_id': $msg" if !$ok;
 }
 my $void_scrip = RT::Scrip->new( $CurrentUser );
 my $void_scrip_action = RT::ScripAction->new( $CurrentUser );


More information about the Rt-commit mailing list