Return a description of the exception via getMessage.

This commit is contained in:
jon.chambers@gmail.com
2013-08-10 03:39:11 +00:00
parent 9a32bb5017
commit 9012fdfd93

View File

@@ -7,7 +7,7 @@ package org.json.simple.parser;
*
*/
public class ParseException extends Exception {
private static final long serialVersionUID = -7880698968187728548L;
private static final long serialVersionUID = -7880698968187728547L;
public static final int ERROR_UNEXPECTED_CHAR = 0;
public static final int ERROR_UNEXPECTED_TOKEN = 1;
@@ -68,7 +68,7 @@ public class ParseException extends Exception {
this.unexpectedObject = unexpectedObject;
}
public String toString(){
public String getMessage() {
StringBuffer sb = new StringBuffer();
switch(errorType){