clarify returning from try/catch

This commit is contained in:
Doug Bell 2011-05-17 15:27:37 -05:00
parent 587d494501
commit 72d32d679d

View file

@ -73,17 +73,19 @@ sub _template_content {
sub getAsset { sub getAsset {
my ( $self, $id ) = @_; my ( $self, $id ) = @_;
try { my ( $asset );
return WebGUI::Asset->newByUrl( $self->session, $id ); try {
$asset = WebGUI::Asset->newByUrl( $self->session, $id );
} }
catch { catch {
try { try {
return WebGUI::Asset->newById( $self->session, $id ); $asset = WebGUI::Asset->newById( $self->session, $id );
} }
catch { catch {
die "Could not find asset $id to include in template: " . $_; die "Could not find asset $id to include in template: " . $_;
}; };
}; };
return $asset;
} }
1; 1;