~sbeattie/apparmor/apparmor-build-testbranch

« back to all changes in this revision

Viewing changes to utils/SubDomain.pm

  • Committer: Steve Beattie
  • Date: 2010-10-06 19:21:56 UTC
  • Revision ID: sbeattie@ubuntu.com-20101006192156-xx7jnzv6sxr95yes
From: Jesse Michael <jesse@lonelyrhinoceros.com>

One of the uses of eval { } wasn't checking $@ for errors, so if
something bad happened, it'd be silently ignored.  This just adds in
an extra check to die if we hit a failure.

Show diffs side-by-side

added added

removed removed

Lines of Context:
946
946
    readinactiveprofiles(); # need to read the profiles to see if an
947
947
                            # inactive local profile is present
948
948
    $profile_data = eval { get_profile($pname) };
 
949
    # propagate any errors we hit inside the get_profile call
 
950
    if ($@) { die $@; }
949
951
 
950
952
    unless ($profile_data) {
951
953
        $profile_data = create_new_profile($pname);