~clint-fewbar/ubuntu/precise/squid3/ignore-sighup-early

« back to all changes in this revision

Viewing changes to src/TextException.cc

  • Committer: Bazaar Package Importer
  • Author(s): Luigi Gangitano
  • Date: 2009-09-24 14:51:06 UTC
  • mfrom: (1.1.12 upstream)
  • mto: (20.2.1 sid)
  • mto: This revision was merged to the branch mainline in revision 21.
  • Revision ID: james.westby@ubuntu.com-20090924145106-38jgrzmj0d73pha5
Tags: 3.1.0.13-1
* Upload to experimental

* New upstream release
  - Fixes Follow-X-Forwarded-For support (Closes: #523943)
  - Adds IPv6 support (Closes: #432351)

* debian/rules
  - Removed obsolete configuration options
  - Enable db and radius basic authentication modules

* debian/patches/01-cf.data.debian
  - Adapted to new upstream version

* debian/patches/02-makefile-defaults
  - Adapted to new upstream version

* debian/{squid.postinst,squid.rc,README.Debian,watch}
  - Updated references to squid 3.1

* debian/squid3.install
  - Install CSS file for error pages
  - Install manual pages for new authentication modules

* debian/squid3-common.install
  - Install documented version of configuration file in /usr/share/doc/squid3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#include "squid.h"
2
2
#include "TextException.h"
3
3
 
 
4
TextException::TextException()
 
5
{
 
6
        message=NULL;
 
7
        theFileName=NULL;
 
8
        theLineNo=0;
 
9
}
 
10
 
 
11
TextException::TextException(const TextException& right) :
 
12
        message((right.message?xstrdup(right.message):NULL)), theFileName(right.theFileName), theLineNo(right.theLineNo)
 
13
{
 
14
}
 
15
 
4
16
TextException::TextException(const char *aMsg, const char *aFileName, int aLineNo):
5
17
        message(xstrdup(aMsg)), theFileName(aFileName), theLineNo(aLineNo)
6
18
{}
7
19
 
8
 
TextException::~TextException()
9
 
{
10
 
    xfree(message);
 
20
TextException::~TextException() throw()
 
21
{
 
22
    if(message) xfree(message);
 
23
}
 
24
 
 
25
TextException& TextException::operator=(const TextException &right)
 
26
{
 
27
        if(this==&right) return *this;
 
28
        if(message) xfree(message);
 
29
    message=(right.message?xstrdup(right.message):NULL);
 
30
    theFileName=right.theFileName;
 
31
    theLineNo=right.theLineNo;
 
32
 
 
33
        return *this;   
 
34
}
 
35
 
 
36
const char *TextException::what() const throw()
 
37
{
 
38
    /// \todo add file:lineno
 
39
    return message ? message : "TextException without a message";
11
40
}
12
41
 
13
42
void Throw(const char *message, const char *fileName, int lineNo)