]>
Commit | Line | Data |
---|---|---|
bbc27441 AJ |
1 | /* |
2 | * Copyright (C) 1996-2014 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 | ||
412da427 FC |
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: | |
496a9e97 FC |
26 | SBuf theThrowingBuf; |
27 | SBuf::size_type accessedPosition; | |
412da427 FC |
28 | }; |
29 | ||
30 | #endif /* _SQUID_SRC_OUTOFBOUNDSEXCEPTION_H */ | |
f53969cc | 31 |