Skip to content
Permalink
Browse files

Try to trap errors while loading classes. Fixes bug #12321.

  • Loading branch information...
perlDreamer committed Jan 27, 2012
1 parent 3a3227c commit 20e49b51d6f09f65f08573442b865e4f863bf904
Showing with 6 additions and 2 deletions.
  1. +1 −0 docs/changelog/7.x.x.txt
  2. +5 −2 lib/WebGUI/Group.pm
@@ -1,4 +1,5 @@
7.10.25
- fixed #12321: Error while deleting a group.

7.10.24
- 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
##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')) {
next ASSET unless $db->quickScalar( "SELECT COUNT(*) FROM asset WHERE className=?", [$assetClass] );
my $definition = WebGUI::Pluggable::instanciate($assetClass, 'definition', [$session]);
my $definition = eval { 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 }) {
next SUBDEF if exists $tableCache->{$subdef->{tableName}};
PROP: while (my ($fieldName, $properties) = each %{ $subdef->{properties} }) {

0 comments on commit 20e49b5

Please sign in to comment.
You can’t perform that action at this time.