]> git.ipfire.org Git - thirdparty/squid.git/blob - src/OutOfBoundsException.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / OutOfBoundsException.h
1 /*
2 * Copyright (C) 1996-2016 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9 #ifndef _SQUID_SRC_OUTOFBOUNDSEXCEPTION_H
10 #define _SQUID_SRC_OUTOFBOUNDSEXCEPTION_H
11
12 #include "base/TextException.h"
13 #include "SBuf.h"
14
15 /**
16 * Exception raised when the user is going out of bounds when accessing
17 * a char within the SBuf
18 */
19 class OutOfBoundsException : public TextException
20 {
21 public:
22 OutOfBoundsException(const SBuf &buf, SBuf::size_type &pos, const char *aFileName = 0, int aLineNo = -1);
23 virtual ~OutOfBoundsException() throw();
24
25 protected:
26 SBuf theThrowingBuf;
27 SBuf::size_type accessedPosition;
28 };
29
30 #endif /* _SQUID_SRC_OUTOFBOUNDSEXCEPTION_H */
31