Exception handling when trying to get assets for their content.
This commit is contained in:
parent
855b59f61d
commit
2fad20dcd0
1 changed files with 3 additions and 2 deletions
|
|
@ -3,6 +3,7 @@ package WebGUI::FilePump::Bundle;
|
||||||
use base qw/WebGUI::Crud WebGUI::JSONCollateral/;
|
use base qw/WebGUI::Crud WebGUI::JSONCollateral/;
|
||||||
use strict;
|
use strict;
|
||||||
use WebGUI::International;
|
use WebGUI::International;
|
||||||
|
use WebGUI::Exception;
|
||||||
use WebGUI::Utility;
|
use WebGUI::Utility;
|
||||||
use URI;
|
use URI;
|
||||||
use Path::Class;
|
use Path::Class;
|
||||||
|
|
@ -508,8 +509,8 @@ sub fetchAsset {
|
||||||
|
|
||||||
my $url = $uri->opaque;
|
my $url = $uri->opaque;
|
||||||
$url =~ s{^/+}{};
|
$url =~ s{^/+}{};
|
||||||
my $asset = WebGUI::Asset->newByUrl($self->session, $url);
|
my $asset = eval {WebGUI::Asset->newByUrl($self->session, $url);};
|
||||||
return {} unless $asset;
|
return {} if Exception::Class->caught();
|
||||||
##Check for a snippet, or snippet subclass?
|
##Check for a snippet, or snippet subclass?
|
||||||
my $guts = {
|
my $guts = {
|
||||||
lastModified => $asset->get('lastModified'),
|
lastModified => $asset->get('lastModified'),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue