Rename ParserException to ParseException

This commit is contained in:
Zafar Khaja 2013-12-03 21:55:19 +04:00
parent 1c08055637
commit 8fd8b46188
4 changed files with 10 additions and 10 deletions

View File

@ -30,7 +30,7 @@ package com.github.zafarkhaja.semver;
* @author Zafar Khaja <zafarkhaja@gmail.com>
* @since 0.7.0
*/
public class GrammarException extends ParserException {
public class GrammarException extends ParseException {
/**
* Constructs a {@code GrammarException} instance with an error message.

View File

@ -29,21 +29,21 @@ package com.github.zafarkhaja.semver;
* @author Zafar Khaja <zafarkhaja@gmail.com>
* @since 0.7.0
*/
public class ParserException extends RuntimeException {
public class ParseException extends RuntimeException {
/**
* Constructs a {@code ParserException} instance with an error message.
* Constructs a {@code ParseException} instance with an error message.
*
* @param message the error message
*/
public ParserException(String message) {
public ParseException(String message) {
super(message);
}
/**
* Constructs a {@code ParserException} instance with no error message.
* Constructs a {@code ParseException} instance with no error message.
*/
public ParserException() {
public ParseException() {
}
}

View File

@ -23,7 +23,7 @@
*/
package com.github.zafarkhaja.semver.expr;
import com.github.zafarkhaja.semver.ParserException;
import com.github.zafarkhaja.semver.ParseException;
import com.github.zafarkhaja.semver.expr.Lexer.*;
import java.util.Arrays;
@ -33,7 +33,7 @@ import java.util.Arrays;
* @author Zafar Khaja <zafarkhaja@gmail.com>
* @since 0.7.0
*/
public class UnexpectedTokenException extends ParserException {
public class UnexpectedTokenException extends ParseException {
/**
* The unexpected token.

View File

@ -64,7 +64,7 @@ public class VersionParserTest {
public void shouldNotAllowDigitsInPreReleaseVersion() {
try {
VersionParser.parsePreRelease("alpha.01");
} catch (ParserException e) {
} catch (ParseException e) {
return;
}
fail("Should not allow digits in pre-release version");
@ -96,7 +96,7 @@ public class VersionParserTest {
public void shouldAllowDigitsInBuildMetadata() {
try {
VersionParser.parseBuild("build.01");
} catch (ParserException e) {
} catch (ParseException e) {
fail("Should allow digits in build metadata");
}
}