Skip to content

Commit 562e9b3

Browse files
committed
adding javadoc to ValidationException#getMessage() and #getErrorMessage()
1 parent 94a2859 commit 562e9b3

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

core/src/main/java/org/everit/json/schema/ValidationException.java

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,12 +260,27 @@ public List<ValidationException> getCausingExceptions() {
260260
return causingExceptions;
261261
}
262262

263+
/**
264+
* Returns a programmer-readable error description prepended by {@link #getPointerToViolation()
265+
* the pointer to the violating fragment} of the JSON document.
266+
*
267+
* @return the error description
268+
*/
263269
@Override
264270
public String getMessage() {
265271
return getPointerToViolation() + ": " + super.getMessage();
266272
}
267273

268-
public String getErrorMessage() { return super.getMessage(); }
274+
/**
275+
* Returns a programmer-readable error description. Unlike {@link #getMessage()} this doesn't
276+
* contain the JSON pointer denoting the violating document fragment.
277+
*
278+
*
279+
* @return the error description
280+
*/
281+
public String getErrorMessage() {
282+
return super.getMessage();
283+
}
269284

270285
/**
271286
* A JSON pointer denoting the part of the document which violates the schema. It always points

0 commit comments

Comments
 (0)