~ubuntu-branches/ubuntu/oneiric/squid3/oneiric-security

« back to all changes in this revision

Viewing changes to lib/cppunit-1.10.0/src/cppunit/DefaultProtector.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Luigi Gangitano
  • Date: 2007-05-13 16:03:16 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070513160316-2h6kn6h1z0q1fvyo
Tags: 3.0.PRE6-1
* New upstream release
  - Removed patches integrated upsteam:
    + 04-m68k-ftbfs

* debian/rules
  - Enable delay pools (Closes: #410785)
  - Enable cache digests (Closes: #416631)
  - Enable ICAP client
  - Raised Max Filedescriptor limit to 65536

* debian/control
  - Added real package dependency for httpd in squid3-cgi

* debian/patches/02-makefile-defaults
  - Fix default configuration file for cachemgr.cgi (Closes: #416630)

* debian/squid3.postinst
  - Fixed bashish in postinst (Closes: #411797)

* debian/patches/05-helpers-typo
  - Added upstream patch fixing compilation error in src/helpers.cc

* debian/patches/06-mem-obj-reference
  - Added upstream patch fixing a mem_obj reference in src/store.cc

* debian/patches/07-close-icap-connections
  - Added upstream patch fixing icap connection starvation

* debian/squid3.rc
  - Added LSB-compliant description to rc script

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include <cppunit/Exception.h>
2
 
#include <cppunit/extensions/TypeInfoHelper.h>
3
 
#include "DefaultProtector.h"
4
 
 
5
 
 
6
 
CPPUNIT_NS_BEGIN
7
 
 
8
 
 
9
 
bool 
10
 
DefaultProtector::protect( const Functor &functor,
11
 
                           const ProtectorContext &context )
12
 
{
13
 
  try
14
 
  {
15
 
    return functor();
16
 
  }
17
 
  catch ( Exception &failure )
18
 
  {
19
 
    reportFailure( context, failure );
20
 
  }
21
 
  catch ( std::exception &e )
22
 
  {
23
 
    std::string shortDescription( "uncaught exception of type " );
24
 
#if CPPUNIT_USE_TYPEINFO_NAME
25
 
    shortDescription += TypeInfoHelper::getClassName( typeid(e) );
26
 
#else
27
 
    shortDescription += "std::exception (or derived).";
28
 
#endif
29
 
    Message message( shortDescription, e.what() );
30
 
    reportError( context, message );
31
 
  }
32
 
  catch ( ... )
33
 
  {
34
 
    reportError( context,
35
 
                 Message( "uncaught exception of unknown type") );
36
 
  }
37
 
  
38
 
  return false;
39
 
}
40
 
 
41
 
 
42
 
CPPUNIT_NS_END