[Pkg-mozext-commits] [tabmixplus] 83/123: Add column number to our _formatStack function
David Prévot
taffit at moszumanska.debian.org
Wed Sep 17 21:16:29 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository tabmixplus.
commit 63a9e0514b442ddf8daaa06041e4fdf139cf45d4
Author: onemen <tabmix.onemen at gmail.com>
Date: Sat Sep 6 09:13:01 2014 +0300
Add column number to our _formatStack function
---
modules/log.jsm | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/modules/log.jsm b/modules/log.jsm
index 1c2795d..df0211b 100644
--- a/modules/log.jsm
+++ b/modules/log.jsm
@@ -234,20 +234,26 @@ options = {
let lines = [], _char = this._char, re = this._pathRegExp;
stack.forEach(function(line) {
let atIndex = line.indexOf("@");
- let lineString = "", columnIndex = line.lastIndexOf(":");
+ let columnIndex = line.lastIndexOf(":");
let fileName = line.slice(atIndex + 1, columnIndex).split(" -> ").pop();
if (fileName) {
- if (fileName.indexOf(":") > 7) {
+ let lineNumber = parseInt(line.slice(columnIndex + 1));
+ let colNumber;
+ if (fileName.replace("://", "///").indexOf(":") > -1) {
+ colNumber = lineNumber;
columnIndex = fileName.lastIndexOf(":");
- lineString = fileName.slice(columnIndex + 1);
+ lineNumber = parseInt(fileName.slice(columnIndex + 1));
fileName = fileName.slice(0, columnIndex);
}
fileName = decodeURI(fileName).replace(re, "");
- let lineNumber = parseInt(lineString || line.slice(columnIndex + 1));
let atIndex = line.indexOf(_char);
- let name = line.slice(0, atIndex).split("(").shift() || "null";
- lines.push(' File "' + fileName + '", line ' +
- lineNumber + ', in ' + name);
+ let name = line.slice(0, atIndex).split("(").shift();
+ let formated = ' File "' + fileName + '", line ' + lineNumber;
+ if (colNumber)
+ formated += ', col ' + colNumber;
+ if (name)
+ formated += ', in ' + name.replace("/<", "");
+ lines.push(formated);
}
});
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/tabmixplus.git
More information about the Pkg-mozext-commits
mailing list