From 2d422bab11e46f056bfafa85b0d49282fec289d8 Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Thu, 8 Nov 2012 21:08:58 +0000 Subject: [PATCH] exception fix --- src/parser/antlr_input.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/parser/antlr_input.cpp b/src/parser/antlr_input.cpp index db7964b37..8987a7572 100644 --- a/src/parser/antlr_input.cpp +++ b/src/parser/antlr_input.cpp @@ -206,7 +206,7 @@ AntlrInput* AntlrInput::newInput(InputLanguage lang, AntlrInputStream& inputStre default: std::stringstream ss; ss << "internal error: unhandled language " << lang << " in AntlrInput::newInput"; - throw ParserException(ss.str()); + throw InputStreamException(ss.str()); } return input; @@ -302,13 +302,13 @@ void AntlrInput::setAntlr3Lexer(pANTLR3_LEXER pLexer) { /* 2*lookahead should be sufficient, but we give ourselves some breathing room. */ pTokenFactory = BoundedTokenFactoryNew(d_antlr3InputStream, 2*d_lookahead); if( pTokenFactory == NULL ) { - throw ParserException("Couldn't create token factory."); + throw InputStreamException("Couldn't create token factory."); } d_lexer->rec->state->tokFactory = pTokenFactory; pBOUNDED_TOKEN_BUFFER buffer = BoundedTokenBufferSourceNew(d_lookahead, d_lexer->rec->state->tokSource); if( buffer == NULL ) { - throw ParserException("Couldn't create token buffer."); + throw InputStreamException("Couldn't create token buffer."); } d_tokenBuffer = buffer; -- 2.30.2