mirror of
https://github.com/fangyidong/json-simple.git
synced 2025-12-07 16:00:52 +03:00
Return a description of the exception via getMessage.
This commit is contained in:
@@ -7,7 +7,7 @@ package org.json.simple.parser;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class ParseException extends Exception {
|
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_CHAR = 0;
|
||||||
public static final int ERROR_UNEXPECTED_TOKEN = 1;
|
public static final int ERROR_UNEXPECTED_TOKEN = 1;
|
||||||
@@ -68,7 +68,7 @@ public class ParseException extends Exception {
|
|||||||
this.unexpectedObject = unexpectedObject;
|
this.unexpectedObject = unexpectedObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String toString(){
|
public String getMessage() {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuffer sb = new StringBuffer();
|
||||||
|
|
||||||
switch(errorType){
|
switch(errorType){
|
||||||
|
|||||||
Reference in New Issue
Block a user