2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-05 08:25:16 +00:00

[2369] Throw a custom exception in ungetChar()

This commit is contained in:
Mukund Sivaraman
2012-10-29 08:35:20 +05:30
parent cb9e761c57
commit a6093a8ef8
3 changed files with 13 additions and 4 deletions

View File

@@ -13,7 +13,6 @@
// PERFORMANCE OF THIS SOFTWARE.
#include <dns/inputsource.h>
#include <exceptions/exceptions.h>
namespace isc {
namespace dns {
@@ -53,7 +52,7 @@ InputSource::ungetChar() {
if (at_eof_) {
at_eof_ = false;
} else if (buffer_pos_ == 0) {
isc_throw(OutOfRange, "Cannot skip before the start of buffer");
isc_throw(UngetError, "Cannot skip before the start of buffer");
} else {
buffer_pos_--;
if (buffer_[buffer_pos_] == '\n') {