Try to trap errors while loading classes. Fixes bug #12321.
This commit is contained in:
parent
3a3227cd6d
commit
20e49b51d6
2 changed files with 6 additions and 2 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
7.10.25
|
7.10.25
|
||||||
|
- fixed #12321: Error while deleting a group.
|
||||||
|
|
||||||
7.10.24
|
7.10.24
|
||||||
- fixed #12318: asset error causes asset manager to fail
|
- fixed #12318: asset error causes asset manager to fail
|
||||||
|
|
|
||||||
|
|
@ -1625,8 +1625,11 @@ sub resetGroupFields {
|
||||||
##Note, I did assets in SQL instead of using the API because you would have to
|
##Note, I did assets in SQL instead of using the API because you would have to
|
||||||
##instanciate every version of the asset that used the group. This should be much quicker
|
##instanciate every version of the asset that used the group. This should be much quicker
|
||||||
ASSET: foreach my $assetClass ($db->buildArray('SELECT DISTINCT className FROM asset')) {
|
ASSET: foreach my $assetClass ($db->buildArray('SELECT DISTINCT className FROM asset')) {
|
||||||
next ASSET unless $db->quickScalar( "SELECT COUNT(*) FROM asset WHERE className=?", [$assetClass] );
|
my $definition = eval { WebGUI::Pluggable::instanciate($assetClass, 'definition', [$session]); };
|
||||||
my $definition = WebGUI::Pluggable::instanciate($assetClass, 'definition', [$session]);
|
if ($@) {
|
||||||
|
$session->log->error("Unable to load className: " . $className . " when looking for asset definitions: " . $@);
|
||||||
|
next ASSET;
|
||||||
|
}
|
||||||
SUBDEF: foreach my $subdef (@{ $definition }) {
|
SUBDEF: foreach my $subdef (@{ $definition }) {
|
||||||
next SUBDEF if exists $tableCache->{$subdef->{tableName}};
|
next SUBDEF if exists $tableCache->{$subdef->{tableName}};
|
||||||
PROP: while (my ($fieldName, $properties) = each %{ $subdef->{properties} }) {
|
PROP: while (my ($fieldName, $properties) = each %{ $subdef->{properties} }) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue