From ffdeed6d39f651bc6ffb75ecf9b8134798041f82 Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Mon, 9 Sep 2019 20:13:50 -0400 Subject: Upgrade version to 0.2 --- docs/jacoco-ut/bjc.everge/ReplError.java.html | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'docs/jacoco-ut/bjc.everge/ReplError.java.html') diff --git a/docs/jacoco-ut/bjc.everge/ReplError.java.html b/docs/jacoco-ut/bjc.everge/ReplError.java.html index 1e0ba81..7c92b1c 100644 --- a/docs/jacoco-ut/bjc.everge/ReplError.java.html +++ b/docs/jacoco-ut/bjc.everge/ReplError.java.html @@ -7,7 +7,7 @@ */ public class ReplError { /** - * The line the error occured on. + * The line the error occurred on. */ public int line; /** @@ -70,18 +70,31 @@ public class ReplError { return String.format("line %d, pair %d:%s\n\t%s", line, numPairs, msg, errString); } + /** + * Convert the error to a printable string. + * + * @return The error as a printable string. + */ public String toPrintString() { - return toPrintString(""); + return toPrintString(""); } + /** + * Convert the error to a printable string, with a custom header. + * + * @param hdr + * The text to include in the header. + * + * @return The error as a printable string. + */ public String toPrintString(String hdr) { String errString; - if (txt == null) errString = "No associated line"; - else if (txt.equals("")) errString = "Text of line was empty"; - else errString = "Text of line was: " + txt; + if (txt == null) errString = "No associated line"; + else if (txt.equals("")) errString = "Text of line was empty"; + else errString = "Text of line was: " + txt; - return String.format("[ERROR] line %d, pair %d: %s\n%s\tContext: %s", - line, numPairs, msg, hdr, errString); + return String.format("[ERROR] line %d, pair %d: %s\n%s\tContext: %s", + line, numPairs, msg, hdr, errString); } } \ No newline at end of file -- cgit v1.2.3