my sneaky trick didn't work

This commit is contained in:
JT Smith 2007-07-24 20:54:02 +00:00
parent 2e953bd47b
commit 9233864868
2 changed files with 6 additions and 7 deletions

View file

@ -243,10 +243,10 @@ sub www_commitVersionTagConfirm {
if (defined $tag && $session->user->isInGroup($tag->get("groupToUse"))) {
my $i18n = WebGUI::International->new($session, "VersionTag");
$tag->set({comments=>$session->form->process("comments", "textarea")});
eval { $tag->requestCommit; };
my $message = $tag->requestCommit;
my $error = "";
if ($@) {
$error .= $i18n->get("bad commit")." ".$@;
if ($message) {
$error .= $i18n->get("bad commit")." ".$message;
}
my $ac = WebGUI::AdminConsole->new($session,"versions");
my $default = WebGUI::Asset->getDefault($session);

View file

@ -15,7 +15,6 @@ package WebGUI::VersionTag;
=cut
use strict;
use Carp qw(carp);
use WebGUI::Asset;
use WebGUI::Workflow::Instance;
@ -384,8 +383,8 @@ sub new {
=head2 requestCommit ( )
Locks the version tag and then kicks off the approval/commit workflow for it. A carp is thrown if workflow is
realtime and fails.
Locks the version tag and then kicks off the approval/commit workflow for it. Returns an error message if it
fails.
=cut
@ -411,7 +410,7 @@ sub requestCommit {
my $errorMessage = "Realtime workflow instance ".$instance->getId." returned status ".$status." where
'done' was expected";
$self->session->errorHandler->warn($errorMessage);
carp $errorMessage;
return $errorMessage;
}
}
}