~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/regex_policy/module.cc

  • Committer: Lee Bieber
  • Date: 2011-03-23 23:16:25 UTC
  • mfrom: (2247.1.2 build)
  • Revision ID: kalebral@gmail.com-20110323231625-61k77qbh7n1iu776
Merge Olaf - Use BOOST_FOREACH
Merge Olaf - Remove std::nothrow from new()

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
{
41
41
  const module::option_map &vm= context.getOptions();
42
42
 
43
 
  Policy *policy= new (nothrow) Policy(fs::path(vm["policy"].as<string>()));
44
 
  if (policy == NULL or not policy->loadFile())
 
43
  Policy *policy= new Policy(fs::path(vm["policy"].as<string>()));
 
44
  if (not policy->loadFile())
45
45
  {
46
46
    errmsg_printf(error::ERROR, _("Could not load regex policy file: %s\n"),
47
47
                  (policy ? policy->getError().str().c_str() : _("Unknown")));
48
 
    if (policy)
49
 
    {
50
 
      delete policy;
51
 
    }
 
48
    delete policy;
52
49
    return 1;
53
50
  }
54
51