Add line number information.

This commit is contained in:
norris%netscape.com 2000-04-19 23:24:04 +00:00
parent d26b72c348
commit b27bb891d9
2 changed files with 10 additions and 2 deletions

View File

@ -65,7 +65,11 @@ public class EcmaError extends RuntimeException {
* of the name of the error together with the message.
*/
public String toString() {
return errorObject.toString();
if (sourceName != null && lineNumber > 0)
return errorObject.toString() + " (" + sourceName +
"; line " + lineNumber + ")";
else
return errorObject.toString();
}
/**

View File

@ -65,7 +65,11 @@ public class EcmaError extends RuntimeException {
* of the name of the error together with the message.
*/
public String toString() {
return errorObject.toString();
if (sourceName != null && lineNumber > 0)
return errorObject.toString() + " (" + sourceName +
"; line " + lineNumber + ")";
else
return errorObject.toString();
}
/**