diff options
-rw-r--r-- | src/lib/dns/master_lexer.h | 13 | ||||
-rw-r--r-- | src/lib/dns/master_lexer_inputsource.cc | 3 | ||||
-rw-r--r-- | src/lib/dns/master_lexer_inputsource.h | 12 | ||||
-rw-r--r-- | src/lib/dns/master_lexer_state.h | 4 |
4 files changed, 16 insertions, 16 deletions
diff --git a/src/lib/dns/master_lexer.h b/src/lib/dns/master_lexer.h index 6ee2189337..a1db405f31 100644 --- a/src/lib/dns/master_lexer.h +++ b/src/lib/dns/master_lexer.h @@ -69,6 +69,14 @@ class State; class MasterLexer { friend class master_lexer_internal::State; public: + /// \brief Exception thrown when we fail to read from the input + /// stream or file. + struct ReadError : public Unexpected { + ReadError(const char* file, size_t line, const char* what) : + Unexpected(file, line, what) + {} + }; + class Token; // we define it separately for better readability /// \brief Options for getNextToken. @@ -198,9 +206,8 @@ public: /// \throw isc::InvalidOperation in case the source is not available. This /// may mean the pushSource() has not been called yet, or that the /// current source has been read past the end. - /// \throw isc::master_lexer_internal::InputSource::ReadError in case - /// there's problem reading from the underlying source (eg. I/O error - /// in the file on the disk). + /// \throw ReadError in case there's problem reading from the underlying + /// source (eg. I/O error in the file on the disk). /// \throw std::bad_alloc in case allocation of some internal resources /// or the token fail. Token getNextToken(Options options = NONE); diff --git a/src/lib/dns/master_lexer_inputsource.cc b/src/lib/dns/master_lexer_inputsource.cc index effe163631..03801f694f 100644 --- a/src/lib/dns/master_lexer_inputsource.cc +++ b/src/lib/dns/master_lexer_inputsource.cc @@ -13,6 +13,7 @@ // PERFORMANCE OF THIS SOFTWARE. #include <dns/master_lexer_inputsource.h> +#include <dns/master_lexer.h> #include <cerrno> #include <cstring> @@ -94,7 +95,7 @@ InputSource::getChar() { // This has to come after the .eof() check as some // implementations seem to check the eofbit also in .fail(). if (input_.fail()) { - isc_throw(ReadError, + isc_throw(MasterLexer::ReadError, "Error reading from the input stream: " << getName()); } buffer_.push_back(c); diff --git a/src/lib/dns/master_lexer_inputsource.h b/src/lib/dns/master_lexer_inputsource.h index 8feffa2ad5..1a4497f556 100644 --- a/src/lib/dns/master_lexer_inputsource.h +++ b/src/lib/dns/master_lexer_inputsource.h @@ -56,14 +56,6 @@ public: {} }; - /// \brief Exception thrown when we fail to read from the input - /// stream or file. - struct ReadError : public Unexpected { - ReadError(const char* file, size_t line, const char* what) : - Unexpected(file, line, what) - {} - }; - /// \brief Exception thrown when we fail to open the input file. struct OpenError : public Unexpected { OpenError(const char* file, size_t line, const char* what) : @@ -124,8 +116,8 @@ public: /// \brief Returns a single character from the input source. If end /// of file is reached, \c END_OF_STREAM is returned. /// - /// \throws ReadError when reading from the input stream or file - /// fails. + /// \throws MasterLexer::ReadError when reading from the input stream or + /// file fails. int getChar(); /// \brief Skips backward a single character in the input diff --git a/src/lib/dns/master_lexer_state.h b/src/lib/dns/master_lexer_state.h index 301151bec9..4cf770043a 100644 --- a/src/lib/dns/master_lexer_state.h +++ b/src/lib/dns/master_lexer_state.h @@ -69,7 +69,7 @@ public: /// tokenization session. The lexer passes a reference to itself /// and options given in \c getNextToken(). /// - /// \throw InputSource::ReadError Unexpected I/O error + /// \throw MasterLexer::ReadError Unexpected I/O error /// \throw std::bad_alloc Internal resource allocation failure /// /// \param lexer The lexer object that holds the main context. @@ -85,7 +85,7 @@ public: /// start(), and keep called on the returned object until NULL is /// returned. The call chain will form the complete state transition. /// - /// \throw InputSource::ReadError Unexpected I/O error + /// \throw MasterLexer::ReadError Unexpected I/O error /// \throw std::bad_alloc Internal resource allocation failure /// /// \param lexer The lexer object that holds the main context. |