Added better error handling in asset instanciation.
This commit is contained in:
parent
886d8215b8
commit
1c4f84ab13
2 changed files with 5 additions and 1 deletions
|
|
@ -1510,7 +1510,10 @@ sub new {
|
|||
$where .= " and (asset.assetId=".$definition->{tableName}.".assetId and ".$definition->{tableName}.".revisionDate=".$revisionDate.")";
|
||||
}
|
||||
$properties = $session->db->quickHashRef($sql.$where);
|
||||
return undef unless (exists $properties->{assetId});
|
||||
unless (exists $properties->{assetId}) {
|
||||
$session->errorHandler->error("Asset $assetId $class $revisionDate is missing properties. Consult your database tables for corruption. ");
|
||||
return undef;
|
||||
}
|
||||
$cache->set($properties,60*60*24);
|
||||
}
|
||||
if (defined $properties) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue