зеркало из https://github.com/mozilla/pjs.git
Add line number information.
This commit is contained in:
Родитель
d11fdcdd70
Коммит
62efd62f19
|
@ -65,6 +65,10 @@ public class EcmaError extends RuntimeException {
|
|||
* of the name of the error together with the message.
|
||||
*/
|
||||
public String toString() {
|
||||
if (sourceName != null && lineNumber > 0)
|
||||
return errorObject.toString() + " (" + sourceName +
|
||||
"; line " + lineNumber + ")";
|
||||
else
|
||||
return errorObject.toString();
|
||||
}
|
||||
|
||||
|
|
|
@ -65,6 +65,10 @@ public class EcmaError extends RuntimeException {
|
|||
* of the name of the error together with the message.
|
||||
*/
|
||||
public String toString() {
|
||||
if (sourceName != null && lineNumber > 0)
|
||||
return errorObject.toString() + " (" + sourceName +
|
||||
"; line " + lineNumber + ")";
|
||||
else
|
||||
return errorObject.toString();
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче